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

Function parseExportFrom

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

parseImportSourceMethod · 0.80
semicolonMethod · 0.45

Tested by

no test coverage detected