Compact parser fixture loc info (#11322)
* chore: compact loc information in parser fixtures * chore: update test fixtures
This commit is contained in:
@@ -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}}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user