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

97 lines
3.4 KiB
JSON

{
"type": "File",
"start":0,"end":68,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":68}},
"program": {
"type": "Program",
"start":0,"end":68,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":68}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":68,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":68}},
"id": {
"type": "Identifier",
"start":9,"end":10,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":10},"identifierName":"f"},
"name": "f"
},
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":13,"end":68,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":68}},
"body": [
{
"type": "WhileStatement",
"start":30,"end":46,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":46}},
"test": {
"type": "BooleanLiteral",
"start":37,"end":41,"loc":{"start":{"line":1,"column":37},"end":{"line":1,"column":41}},
"value": true
},
"body": {
"type": "BlockStatement",
"start":43,"end":46,"loc":{"start":{"line":1,"column":43},"end":{"line":1,"column":46}},
"body": [],
"directives": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": " infinite ",
"start":15,"end":29,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":29}}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": " bar ",
"start":47,"end":56,"loc":{"start":{"line":1,"column":47},"end":{"line":1,"column":56}}
}
]
},
{
"type": "VariableDeclaration",
"start":57,"end":66,"loc":{"start":{"line":1,"column":57},"end":{"line":1,"column":66}},
"declarations": [
{
"type": "VariableDeclarator",
"start":61,"end":65,"loc":{"start":{"line":1,"column":61},"end":{"line":1,"column":65}},
"id": {
"type": "Identifier",
"start":61,"end":65,"loc":{"start":{"line":1,"column":61},"end":{"line":1,"column":65},"identifierName":"each"},
"name": "each"
},
"init": null
}
],
"kind": "var",
"leadingComments": [
{
"type": "CommentBlock",
"value": " bar ",
"start":47,"end":56,"loc":{"start":{"line":1,"column":47},"end":{"line":1,"column":56}}
}
]
}
],
"directives": []
}
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": " infinite ",
"start":15,"end":29,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":29}}
},
{
"type": "CommentBlock",
"value": " bar ",
"start":47,"end":56,"loc":{"start":{"line":1,"column":47},"end":{"line":1,"column":56}}
}
]
}