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

Function parsePrivateName

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

nextMethod · 0.80
finishNodeMethod · 0.80

Tested by

no test coverage detected