Files
Huáng JùnliàngandGitHub 68679c0760 polish(parser): improve ImportExpression error recovery (#17902)
* refactor: remove EstreeImportExpression type

* polish: recover from import spread and arity

* fix linting errors

* polish: print phase in import call errors

* polish: update ImportCallNotNewExpression msg

* node scripts/cleanup-fixtures.ts
2026-04-19 14:29:45 -04:00

45 lines
1.6 KiB
JSON

{
"type": "File",
"start":0,"end":14,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":14,"index":14}},
"errors": [
"SyntaxError: `...` is not allowed in `import()`. (1:7)"
],
"program": {
"type": "Program",
"start":0,"end":14,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":14,"index":14}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":14,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":14,"index":14}},
"expression": {
"type": "ImportExpression",
"start":0,"end":14,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":14,"index":14}},
"source": {
"type": "SpreadElement",
"start":7,"end":13,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":13,"index":13}},
"argument": {
"type": "ArrayExpression",
"start":10,"end":13,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":13,"index":13}},
"elements": [
{
"type": "NumericLiteral",
"start":11,"end":12,"loc":{"start":{"line":1,"column":11,"index":11},"end":{"line":1,"column":12,"index":12}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
]
}
},
"options": null
}
}
],
"directives": []
}
}