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

Function parsePrivateName

packages/babel-parser/src/parser/expression.ts:1622–1633  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1620 }
1621
1622 parsePrivateName(): N.PrivateName {
1623 const node = this.startNode<N.PrivateName>();
1624 const id = this.startNodeAt<N.Identifier>(
1625 // The position is hardcoded because we merge `#` and name into a single
1626 // tt.privateName token
1627 createPositionWithColumnOffset(this.state.startLoc, 1),
1628 );
1629 const name = this.state.value;
1630 this.next(); // eat #name;
1631 node.id = this.createIdentifier(id, name);
1632 return this.finishNode(node, "PrivateName");
1633 }
1634
1635 parseFunctionOrFunctionSent(
1636 this: Parser,

Callers

nothing calls this directly

Calls 3

nextMethod · 0.80
finishNodeMethod · 0.80

Tested by

no test coverage detected