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

Function parseImport

packages/babel-parser/src/parser/statement.ts:3074–3084  ·  view source on GitHub ↗
(this: Parser, node: Undone<N.ImportDeclaration>)

Source from the content-addressed store, hash-verified

3072 // https://tc39.es/ecma262/#prod-ImportDeclaration
3073
3074 parseImport(this: Parser, node: Undone<N.ImportDeclaration>): N.AnyImport {
3075 if (this.match(tt.string)) {
3076 // import '...'
3077 return this.parseImportSourceAndAttributes(node);
3078 }
3079
3080 return this.parseImportSpecifiersAndAfter(
3081 node,
3082 this.parseMaybeImportPhase(node, /* isExport */ false),
3083 );
3084 }
3085
3086 parseImportSpecifiersAndAfter(
3087 this: Parser,

Callers

nothing calls this directly

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected