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

Function parseFunctionParams

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

enterMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected