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

55 lines
1.7 KiB
JSON

{
"type": "File",
"start":0,"end":30,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":20}},
"program": {
"type": "Program",
"start":0,"end":30,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":20}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "IfStatement",
"start":10,"end":30,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":20}},
"test": {
"type": "Identifier",
"start":25,"end":26,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":16},"identifierName":"a"},
"name": "a",
"leadingComments": [
{
"type": "CommentBlock",
"value": " bar ",
"start":14,"end":23,"loc":{"start":{"line":2,"column":4},"end":{"line":2,"column":13}}
}
]
},
"consequent": {
"type": "BlockStatement",
"start":28,"end":30,"loc":{"start":{"line":2,"column":18},"end":{"line":2,"column":20}},
"body": [],
"directives": []
},
"alternate": null,
"leadingComments": [
{
"type": "CommentBlock",
"value": " foo ",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": " foo ",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}}
},
{
"type": "CommentBlock",
"value": " bar ",
"start":14,"end":23,"loc":{"start":{"line":2,"column":4},"end":{"line":2,"column":13}}
}
]
}