(this: Parser, node: Undone<N.ImportDeclaration>)
| 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, |