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

70 lines
2.5 KiB
JSON

{
"type": "File",
"start":0,"end":56,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":56}},
"program": {
"type": "Program",
"start":0,"end":56,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":56}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "SwitchStatement",
"start":0,"end":56,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":56}},
"discriminant": {
"type": "Identifier",
"start":8,"end":14,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":14},"identifierName":"answer"},
"name": "answer"
},
"cases": [
{
"type": "SwitchCase",
"start":18,"end":39,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":39}},
"consequent": [
{
"type": "ExpressionStatement",
"start":27,"end":32,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":32}},
"expression": {
"type": "CallExpression",
"start":27,"end":31,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":31}},
"callee": {
"type": "Identifier",
"start":27,"end":29,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":29},"identifierName":"hi"},
"name": "hi"
},
"arguments": []
}
},
{
"type": "BreakStatement",
"start":33,"end":39,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":39}},
"label": null
}
],
"test": {
"type": "NumericLiteral",
"start":23,"end":25,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":25}},
"extra": {
"rawValue": 42,
"raw": "42"
},
"value": 42
}
},
{
"type": "SwitchCase",
"start":40,"end":54,"loc":{"start":{"line":1,"column":40},"end":{"line":1,"column":54}},
"consequent": [
{
"type": "BreakStatement",
"start":49,"end":54,"loc":{"start":{"line":1,"column":49},"end":{"line":1,"column":54}},
"label": null
}
],
"test": null
}
]
}
],
"directives": []
}
}