Files
Huáng JùnliàngandGitHub 9d69fa1277 Improve module expression parsing/printing (#14980)
* fix: several ModuleExpression printing edgecases

* fix: end module expression's program before }

* fix: expect braceL after module

* refactor: introduce ensureNoLineTerminator

* use this.ensureNoLineTerminator

* update source-map fixtures

* address review comments

* consume eof when end is eof
2022-09-30 17:32:27 -04:00

30 lines
1.0 KiB
JSON

{
"type": "File",
"start":0,"end":10,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":10,"index":10}},
"program": {
"type": "Program",
"start":0,"end":10,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":10,"index":10}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":10,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":10,"index":10}},
"expression": {
"type": "ModuleExpression",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":9,"index":9}},
"body": {
"type": "Program",
"start":8,"end":8,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":1,"column":8,"index":8}},
"sourceType": "module",
"interpreter": null,
"body": [],
"directives": []
}
}
}
],
"directives": []
}
}