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

Function isPotentialImportPhase

packages/babel-parser/src/parser/statement.ts:2938–2947  ·  view source on GitHub ↗
(isExport: boolean)

Source from the content-addressed store, hash-verified

2936 }
2937
2938 isPotentialImportPhase(isExport: boolean): boolean {
2939 if (isExport) {
2940 if (!this.isContextual(tt._defer)) return false;
2941 // export defer { x } from '...'
2942 // export defer * as ns from '...'
2943 const ch = this.lookaheadCharCode();
2944 return ch === charCodes.leftCurlyBrace || ch === charCodes.asterisk;
2945 }
2946 return this.isContextual(tt._source) || this.isContextual(tt._defer);
2947 }
2948
2949 applyImportPhase(
2950 node: Undone<N.ImportDeclaration | N.ExportNamedDeclaration>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected