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

Function parseImport

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected