(
this: Parser,
onUnparenthesizedImportExpression: (base: N.ImportExpression) => void,
)
| 1157 | // Parse a no-call expression (like argument of `new` or `::` operators). |
| 1158 | // https://tc39.es/ecma262/#prod-MemberExpression |
| 1159 | parseNoCallExpr( |
| 1160 | this: Parser, |
| 1161 | onUnparenthesizedImportExpression: (base: N.ImportExpression) => void, |
| 1162 | ): N.Expression | N.Super | N.Import { |
| 1163 | const startLoc = this.state.startLoc; |
| 1164 | const isImport = this.match(tt._import); |
| 1165 | this.state.canStartArrow = false; |
| 1166 | const base = this.parseExprAtom(); |
| 1167 | if (isImport && base.type === "ImportExpression") { |
| 1168 | onUnparenthesizedImportExpression(base); |
| 1169 | } |
| 1170 | return this.parseSubscripts(base, startLoc, true); |
| 1171 | } |
| 1172 | |
| 1173 | // Parse an atomic expression — either a single token that is an |
| 1174 | // expression, an expression started by a keyword like `function` or |
nothing calls this directly
no test coverage detected