Huáng Jùnliàng dc7c5640e9
Compact parser fixture loc info (#11322)
* chore: compact loc information in parser fixtures

* chore: update test fixtures
2020-03-23 20:10:29 -04:00

66 lines
2.3 KiB
JSON

{
"type": "File",
"start":0,"end":41,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":25}},
"errors": [
"SyntaxError: `foo` has already been exported. Exported identifiers must be unique. (2:0)"
],
"program": {
"type": "Program",
"start":0,"end":41,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":25}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"start":0,"end":15,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":15}},
"specifiers": [
{
"type": "ExportSpecifier",
"start":9,"end":12,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":12}},
"local": {
"type": "Identifier",
"start":9,"end":12,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":12},"identifierName":"foo"},
"name": "foo"
},
"exported": {
"type": "Identifier",
"start":9,"end":12,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":12},"identifierName":"foo"},
"name": "foo"
}
}
],
"source": null,
"declaration": null
},
{
"type": "ExportNamedDeclaration",
"start":16,"end":40,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":24}},
"specifiers": [],
"source": null,
"declaration": {
"type": "FunctionDeclaration",
"start":23,"end":40,"loc":{"start":{"line":2,"column":7},"end":{"line":2,"column":24}},
"id": {
"type": "Identifier",
"start":32,"end":35,"loc":{"start":{"line":2,"column":16},"end":{"line":2,"column":19},"identifierName":"foo"},
"name": "foo"
},
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":38,"end":40,"loc":{"start":{"line":2,"column":22},"end":{"line":2,"column":24}},
"body": [],
"directives": []
}
}
},
{
"type": "EmptyStatement",
"start":40,"end":41,"loc":{"start":{"line":2,"column":24},"end":{"line":2,"column":25}}
}
],
"directives": []
}
}