Compact parser fixture loc info (#11322)

* chore: compact loc information in parser fixtures

* chore: update test fixtures
This commit is contained in:
Huáng Jùnliàng
2020-03-23 20:10:29 -04:00
committed by GitHub
parent 6a728a05a8
commit dc7c5640e9
3793 changed files with 38861 additions and 472314 deletions

View File

@@ -1,144 +1,44 @@
{
"type": "File",
"start": 0,
"end": 69,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 18
}
},
"start":0,"end":69,"loc":{"start":{"line":1,"column":0},"end":{"line":6,"column":18}},
"program": {
"type": "Program",
"start": 0,
"end": 69,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 18
}
},
"start":0,"end":69,"loc":{"start":{"line":1,"column":0},"end":{"line":6,"column":18}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start": 0,
"end": 69,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 18
}
},
"start":0,"end":69,"loc":{"start":{"line":1,"column":0},"end":{"line":6,"column":18}},
"declarations": [
{
"type": "VariableDeclarator",
"start": 6,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 6,
"column": 17
}
},
"start":6,"end":68,"loc":{"start":{"line":1,"column":6},"end":{"line":6,"column":17}},
"id": {
"type": "ArrayPattern",
"start": 6,
"end": 52,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 6,
"column": 1
}
},
"start":6,"end":52,"loc":{"start":{"line":1,"column":6},"end":{"line":6,"column":1}},
"elements": [
{
"type": "Identifier",
"start": 22,
"end": 23,
"loc": {
"start": {
"line": 3,
"column": 2
},
"end": {
"line": 3,
"column": 3
},
"identifierName": "x"
},
"start":22,"end":23,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":3},"identifierName":"x"},
"name": "x",
"leadingComments": [
{
"type": "CommentBlock",
"value": " One ",
"start": 10,
"end": 19,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 11
}
}
"start":10,"end":19,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":11}}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": " Two ",
"start": 26,
"end": 35,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 11
}
}
"start":26,"end":35,"loc":{"start":{"line":4,"column":2},"end":{"line":4,"column":11}}
},
{
"type": "CommentBlock",
"value": " Three ",
"start": 39,
"end": 50,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 13
}
}
"start":39,"end":50,"loc":{"start":{"line":5,"column":2},"end":{"line":5,"column":13}}
}
]
}
@@ -147,35 +47,13 @@
{
"type": "CommentBlock",
"value": " Four ",
"start": 53,
"end": 63,
"loc": {
"start": {
"line": 6,
"column": 2
},
"end": {
"line": 6,
"column": 12
}
}
"start":53,"end":63,"loc":{"start":{"line":6,"column":2},"end":{"line":6,"column":12}}
}
]
},
"init": {
"type": "ArrayExpression",
"start": 66,
"end": 68,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 17
}
},
"start":66,"end":68,"loc":{"start":{"line":6,"column":15},"end":{"line":6,"column":17}},
"elements": []
}
}
@@ -189,66 +67,22 @@
{
"type": "CommentBlock",
"value": " One ",
"start": 10,
"end": 19,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 11
}
}
"start":10,"end":19,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":11}}
},
{
"type": "CommentBlock",
"value": " Two ",
"start": 26,
"end": 35,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 11
}
}
"start":26,"end":35,"loc":{"start":{"line":4,"column":2},"end":{"line":4,"column":11}}
},
{
"type": "CommentBlock",
"value": " Three ",
"start": 39,
"end": 50,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 13
}
}
"start":39,"end":50,"loc":{"start":{"line":5,"column":2},"end":{"line":5,"column":13}}
},
{
"type": "CommentBlock",
"value": " Four ",
"start": 53,
"end": 63,
"loc": {
"start": {
"line": 6,
"column": 2
},
"end": {
"line": 6,
"column": 12
}
}
"start":53,"end":63,"loc":{"start":{"line":6,"column":2},"end":{"line":6,"column":12}}
}
]
}