MCPcopy Create free account
hub / github.com/babel/babel / parseFunctionBodyAndFinish

Function parseFunctionBodyAndFinish

packages/babel-parser/src/parser/expression.ts:2598–2608  ·  view source on GitHub ↗
(node: Undone<T>, type: T["type"], isMethod: boolean = false)

Source from the content-addressed store, hash-verified

2596 }
2597
2598 parseFunctionBodyAndFinish<
2599 T extends
2600 | N.Function
2601 | N.TSDeclareMethod
2602 | N.TSDeclareFunction
2603 | N.ClassPrivateMethod,
2604 >(node: Undone<T>, type: T["type"], isMethod: boolean = false): T {
2605 // @ts-expect-error (node is not bodiless if we get here)
2606 this.parseFunctionBody(node, false, isMethod);
2607 return this.finishNode(node, type);
2608 }
2609
2610 // Parse function body and check parameters.
2611 parseFunctionBody(

Callers

nothing calls this directly

Calls 2

finishNodeMethod · 0.80
parseFunctionBodyMethod · 0.45

Tested by

no test coverage detected