Compact parser fixture loc info (#11322)
* chore: compact loc information in parser fixtures * chore: update test fixtures
This commit is contained in:
@@ -1,109 +1,31 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 72,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"start":0,"end":72,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":16}},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 72,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"start":0,"end":72,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":16}},
|
||||
"sourceType": "module",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "DeclareFunction",
|
||||
"start": 0,
|
||||
"end": 27,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"start":0,"end":27,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":27}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
"end": 27,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 17
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
},
|
||||
"identifierName": "F1"
|
||||
},
|
||||
"start":17,"end":27,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":27},"identifierName":"F1"},
|
||||
"name": "F1",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
"start": 19,
|
||||
"end": 27,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"start":19,"end":27,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":27}},
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 19,
|
||||
"end": 27,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"start":19,"end":27,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":27}},
|
||||
"typeParameters": null,
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"returnType": {
|
||||
"type": "VoidTypeAnnotation",
|
||||
"start": 23,
|
||||
"end": 27,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 23
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
"start":23,"end":27,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":27}}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,79 +34,23 @@
|
||||
},
|
||||
{
|
||||
"type": "DeclareFunction",
|
||||
"start": 28,
|
||||
"end": 55,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"start":28,"end":55,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":27}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 45,
|
||||
"end": 55,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 17
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 27
|
||||
},
|
||||
"identifierName": "F1"
|
||||
},
|
||||
"start":45,"end":55,"loc":{"start":{"line":2,"column":17},"end":{"line":2,"column":27},"identifierName":"F1"},
|
||||
"name": "F1",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
"start": 47,
|
||||
"end": 55,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 19
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"start":47,"end":55,"loc":{"start":{"line":2,"column":19},"end":{"line":2,"column":27}},
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 47,
|
||||
"end": 55,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 19
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"start":47,"end":55,"loc":{"start":{"line":2,"column":19},"end":{"line":2,"column":27}},
|
||||
"typeParameters": null,
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"returnType": {
|
||||
"type": "VoidTypeAnnotation",
|
||||
"start": 51,
|
||||
"end": 55,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 23
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
"start":51,"end":55,"loc":{"start":{"line":2,"column":23},"end":{"line":2,"column":27}}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,33 +59,10 @@
|
||||
},
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start": 56,
|
||||
"end": 72,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"start":56,"end":72,"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":16}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 65,
|
||||
"end": 67,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 11
|
||||
},
|
||||
"identifierName": "F1"
|
||||
},
|
||||
"start":65,"end":67,"loc":{"start":{"line":3,"column":9},"end":{"line":3,"column":11},"identifierName":"F1"},
|
||||
"name": "F1"
|
||||
},
|
||||
"generator": false,
|
||||
@@ -227,18 +70,7 @@
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 70,
|
||||
"end": 72,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 14
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"start":70,"end":72,"loc":{"start":{"line":3,"column":14},"end":{"line":3,"column":16}},
|
||||
"body": [],
|
||||
"directives": []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user