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

Function parseMetaProperty

packages/babel-parser/src/parser/expression.ts:1667–1686  ·  view source on GitHub ↗
(
    node: Undone<N.MetaProperty>,
    meta: N.Identifier,
    propertyName: string,
  )

Source from the content-addressed store, hash-verified

1665 }
1666
1667 parseMetaProperty(
1668 node: Undone<N.MetaProperty>,
1669 meta: N.Identifier,
1670 propertyName: string,
1671 ): N.MetaProperty {
1672 node.meta = meta;
1673
1674 const containsEsc = this.state.containsEsc;
1675
1676 node.property = this.parseIdentifier(true);
1677
1678 if (node.property.name !== propertyName || containsEsc) {
1679 this.raise(Errors.UnsupportedMetaProperty, node.property, {
1680 target: meta.name,
1681 onlyValidPropertyName: propertyName,
1682 });
1683 }
1684
1685 return this.finishNode(node, "MetaProperty");
1686 }
1687
1688 // https://tc39.es/ecma262/#prod-ImportMeta
1689 // https://tc39.es/proposal-source-phase-imports/

Callers

nothing calls this directly

Calls 2

parseIdentifierMethod · 0.80
finishNodeMethod · 0.80

Tested by

no test coverage detected