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

115 lines
4.3 KiB
JSON

{
"type": "File",
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
"program": {
"type": "Program",
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
"expression": {
"type": "JSXElement",
"start":0,"end":38,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},
"openingElement": {
"type": "JSXOpeningElement",
"start":0,"end":3,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":3}},
"name": {
"type": "JSXIdentifier",
"start":1,"end":2,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":2}},
"name": "p"
},
"attributes": [],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start":34,"end":38,"loc":{"start":{"line":1,"column":34},"end":{"line":1,"column":38}},
"name": {
"type": "JSXIdentifier",
"start":36,"end":37,"loc":{"start":{"line":1,"column":36},"end":{"line":1,"column":37}},
"name": "p"
}
},
"children": [
{
"type": "JSXText",
"start":3,"end":7,"loc":{"start":{"line":1,"column":3},"end":{"line":1,"column":7}},
"extra": {
"rawValue": "foo ",
"raw": "foo "
},
"value": "foo "
},
{
"type": "JSXElement",
"start":7,"end":30,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":30}},
"openingElement": {
"type": "JSXOpeningElement",
"start":7,"end":22,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":22}},
"name": {
"type": "JSXIdentifier",
"start":8,"end":9,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":9}},
"name": "a"
},
"attributes": [
{
"type": "JSXAttribute",
"start":10,"end":21,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":21}},
"name": {
"type": "JSXIdentifier",
"start":10,"end":14,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":14}},
"name": "href"
},
"value": {
"type": "StringLiteral",
"start":15,"end":21,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":21}},
"extra": {
"rawValue": "test",
"raw": "\"test\""
},
"value": "test"
}
}
],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start":26,"end":30,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":30}},
"name": {
"type": "JSXIdentifier",
"start":28,"end":29,"loc":{"start":{"line":1,"column":28},"end":{"line":1,"column":29}},
"name": "a"
}
},
"children": [
{
"type": "JSXText",
"start":22,"end":26,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":26}},
"extra": {
"rawValue": " bar",
"raw": " bar"
},
"value": " bar"
}
]
},
{
"type": "JSXText",
"start":30,"end":34,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":34}},
"extra": {
"rawValue": " baz",
"raw": " baz"
},
"value": " baz"
}
]
}
}
],
"directives": []
}
}