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

Function parseFunctionParams

packages/babel-parser/src/parser/statement.ts:1570–1585  ·  view source on GitHub ↗
(
    this: Parser,
    node: Undone<N.Function>,
    isConstructor?: boolean,
  )

Source from the content-addressed store, hash-verified

1568 }
1569
1570 parseFunctionParams(
1571 this: Parser,
1572 node: Undone<N.Function>,
1573 isConstructor?: boolean,
1574 ): void {
1575 this.expect(tt.parenL);
1576 this.expressionScope.enter(parameterDeclarationScope);
1577 node.params = this.parseBindingList(
1578 tt.parenR,
1579 charCodes.rightParenthesis,
1580 ParseBindingListFlags.IS_FUNCTION_PARAMS |
1581 (isConstructor ? ParseBindingListFlags.IS_CONSTRUCTOR_PARAMS : 0),
1582 ) as N.Pattern[];
1583
1584 this.expressionScope.exit();
1585 }
1586
1587 registerFunctionStatementId(node: N.NormalFunction): void {
1588 if (!node.id) return;

Callers

nothing calls this directly

Calls 2

enterMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected