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

165 lines
7.3 KiB
JSON

{
"type": "File",
"start":0,"end":52,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":52}},
"program": {
"type": "Program",
"start":0,"end":52,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":52}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":52,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":52}},
"expression": {
"type": "JSXElement",
"start":0,"end":52,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":52}},
"openingElement": {
"type": "JSXOpeningElement",
"start":0,"end":31,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":31}},
"name": {
"type": "JSXIdentifier",
"start":1,"end":2,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":2}},
"name": "A"
},
"attributes": [
{
"type": "JSXAttribute",
"start":3,"end":16,"loc":{"start":{"line":1,"column":3},"end":{"line":1,"column":16}},
"name": {
"type": "JSXIdentifier",
"start":3,"end":5,"loc":{"start":{"line":1,"column":3},"end":{"line":1,"column":5}},
"name": "aa"
},
"value": {
"type": "JSXExpressionContainer",
"start":6,"end":16,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":16}},
"expression": {
"type": "MemberExpression",
"start":7,"end":15,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":15}},
"object": {
"type": "MemberExpression",
"start":7,"end":12,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":12}},
"object": {
"type": "Identifier",
"start":7,"end":9,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":9},"identifierName":"aa"},
"name": "aa"
},
"property": {
"type": "Identifier",
"start":10,"end":12,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":12},"identifierName":"bb"},
"name": "bb"
},
"computed": false
},
"property": {
"type": "Identifier",
"start":13,"end":15,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":15},"identifierName":"cc"},
"name": "cc"
},
"computed": false
}
}
},
{
"type": "JSXAttribute",
"start":17,"end":30,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":30}},
"name": {
"type": "JSXIdentifier",
"start":17,"end":19,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":19}},
"name": "bb"
},
"value": {
"type": "JSXExpressionContainer",
"start":20,"end":30,"loc":{"start":{"line":1,"column":20},"end":{"line":1,"column":30}},
"expression": {
"type": "MemberExpression",
"start":21,"end":29,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":29}},
"object": {
"type": "MemberExpression",
"start":21,"end":26,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":26}},
"object": {
"type": "Identifier",
"start":21,"end":23,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":23},"identifierName":"bb"},
"name": "bb"
},
"property": {
"type": "Identifier",
"start":24,"end":26,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":26},"identifierName":"cc"},
"name": "cc"
},
"computed": false
},
"property": {
"type": "Identifier",
"start":27,"end":29,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":29},"identifierName":"dd"},
"name": "dd"
},
"computed": false
}
}
}
],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start":48,"end":52,"loc":{"start":{"line":1,"column":48},"end":{"line":1,"column":52}},
"name": {
"type": "JSXIdentifier",
"start":50,"end":51,"loc":{"start":{"line":1,"column":50},"end":{"line":1,"column":51}},
"name": "A"
}
},
"children": [
{
"type": "JSXElement",
"start":31,"end":48,"loc":{"start":{"line":1,"column":31},"end":{"line":1,"column":48}},
"openingElement": {
"type": "JSXOpeningElement",
"start":31,"end":36,"loc":{"start":{"line":1,"column":31},"end":{"line":1,"column":36}},
"name": {
"type": "JSXIdentifier",
"start":32,"end":35,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":35}},
"name": "div"
},
"attributes": [],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start":42,"end":48,"loc":{"start":{"line":1,"column":42},"end":{"line":1,"column":48}},
"name": {
"type": "JSXIdentifier",
"start":44,"end":47,"loc":{"start":{"line":1,"column":44},"end":{"line":1,"column":47}},
"name": "div"
}
},
"children": [
{
"type": "JSXExpressionContainer",
"start":36,"end":42,"loc":{"start":{"line":1,"column":36},"end":{"line":1,"column":42}},
"expression": {
"type": "MemberExpression",
"start":37,"end":41,"loc":{"start":{"line":1,"column":37},"end":{"line":1,"column":41}},
"object": {
"type": "Identifier",
"start":37,"end":39,"loc":{"start":{"line":1,"column":37},"end":{"line":1,"column":39},"identifierName":"aa"},
"name": "aa"
},
"property": {
"type": "Identifier",
"start":40,"end":41,"loc":{"start":{"line":1,"column":40},"end":{"line":1,"column":41},"identifierName":"b"},
"name": "b"
},
"computed": false
}
}
]
}
]
}
}
],
"directives": []
}
}