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

162 lines
6.7 KiB
JSON

{
"type": "File",
"start":0,"end":31,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":31}},
"program": {
"type": "Program",
"start":0,"end":31,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":31}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start":0,"end":31,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":31}},
"declarations": [
{
"type": "VariableDeclarator",
"start":4,"end":31,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":31}},
"id": {
"type": "ObjectPattern",
"start":4,"end":29,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":29}},
"properties": [
{
"type": "ObjectProperty",
"start":5,"end":6,"loc":{"start":{"line":1,"column":5},"end":{"line":1,"column":6}},
"method": false,
"key": {
"type": "Identifier",
"start":5,"end":6,"loc":{"start":{"line":1,"column":5},"end":{"line":1,"column":6},"identifierName":"a"},
"name": "a"
},
"computed": false,
"shorthand": true,
"value": {
"type": "Identifier",
"start":5,"end":6,"loc":{"start":{"line":1,"column":5},"end":{"line":1,"column":6},"identifierName":"a"},
"name": "a"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start":7,"end":10,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":10}},
"method": false,
"key": {
"type": "Identifier",
"start":7,"end":8,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":8},"identifierName":"b"},
"name": "b"
},
"computed": false,
"shorthand": true,
"value": {
"type": "AssignmentPattern",
"start":7,"end":10,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":10}},
"left": {
"type": "Identifier",
"start":7,"end":8,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":8},"identifierName":"b"},
"name": "b"
},
"right": {
"type": "NumericLiteral",
"start":9,"end":10,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":10}},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start":11,"end":14,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":14}},
"method": false,
"key": {
"type": "Identifier",
"start":11,"end":12,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":12},"identifierName":"c"},
"name": "c"
},
"computed": false,
"shorthand": false,
"value": {
"type": "Identifier",
"start":13,"end":14,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":14},"identifierName":"d"},
"name": "d"
}
},
{
"type": "ObjectProperty",
"start":15,"end":20,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":20}},
"method": false,
"key": {
"type": "Identifier",
"start":15,"end":16,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":16},"identifierName":"e"},
"name": "e"
},
"computed": false,
"shorthand": false,
"value": {
"type": "AssignmentPattern",
"start":17,"end":20,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":20}},
"left": {
"type": "Identifier",
"start":17,"end":18,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":18},"identifierName":"f"},
"name": "f"
},
"right": {
"type": "NumericLiteral",
"start":19,"end":20,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":20}},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
}
},
{
"type": "ObjectProperty",
"start":21,"end":28,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":28}},
"method": false,
"computed": true,
"key": {
"type": "Identifier",
"start":22,"end":23,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":23},"identifierName":"g"},
"name": "g"
},
"shorthand": false,
"value": {
"type": "ArrayPattern",
"start":25,"end":28,"loc":{"start":{"line":1,"column":25},"end":{"line":1,"column":28}},
"elements": [
{
"type": "Identifier",
"start":26,"end":27,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":27},"identifierName":"h"},
"name": "h"
}
]
}
}
]
},
"init": {
"type": "NumericLiteral",
"start":30,"end":31,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":31}},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
}
],
"kind": "let"
}
],
"directives": []
}
}