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

Function parseExportFrom

packages/babel-parser/src/parser/statement.ts:2664–2677  ·  view source on GitHub ↗
(
    this: Parser,
    node: Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration>,
    expect?: boolean,
  )

Source from the content-addressed store, hash-verified

2662 }
2663
2664 parseExportFrom(
2665 this: Parser,
2666 node: Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration>,
2667 expect?: boolean,
2668 ): void {
2669 if (this.eatContextual(tt._from)) {
2670 node.source = this.parseImportSource();
2671 this.maybeParseImportAttributes(node);
2672 } else if (expect) {
2673 this.unexpected(null, tt._from);
2674 }
2675
2676 this.semicolon();
2677 }
2678
2679 shouldParseExportDeclaration(): boolean {
2680 const { type } = this.state;

Callers

nothing calls this directly

Calls 2

parseImportSourceMethod · 0.80
semicolonMethod · 0.45

Tested by

no test coverage detected