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,173 +1,50 @@
{
"type": "File",
"start": 0,
"end": 51,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 2
}
},
"start":0,"end":51,"loc":{"start":{"line":1,"column":0},"end":{"line":6,"column":2}},
"program": {
"type": "Program",
"start": 0,
"end": 51,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 2
}
},
"start":0,"end":51,"loc":{"start":{"line":1,"column":0},"end":{"line":6,"column":2}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 51,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 2
}
},
"start":0,"end":51,"loc":{"start":{"line":1,"column":0},"end":{"line":6,"column":2}},
"expression": {
"type": "CallExpression",
"start": 0,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 1
}
},
"start":0,"end":50,"loc":{"start":{"line":1,"column":0},"end":{"line":6,"column":1}},
"callee": {
"type": "Identifier",
"start": 0,
"end": 4,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 4
},
"identifierName": "test"
},
"start":0,"end":4,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":4},"identifierName":"test"},
"name": "test"
},
"arguments": [
{
"type": "FunctionExpression",
"start": 5,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 4,
"column": 1
}
},
"start":5,"end":41,"loc":{"start":{"line":1,"column":5},"end":{"line":4,"column":1}},
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 16,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 4,
"column": 1
}
},
"start":16,"end":41,"loc":{"start":{"line":1,"column":16},"end":{"line":4,"column":1}},
"body": [
{
"type": "VariableDeclaration",
"start": 20,
"end": 30,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 12
}
},
"start":20,"end":30,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":12}},
"declarations": [
{
"type": "VariableDeclarator",
"start": 24,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 11
}
},
"start":24,"end":29,"loc":{"start":{"line":2,"column":6},"end":{"line":2,"column":11}},
"id": {
"type": "Identifier",
"start": 24,
"end": 25,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 7
},
"identifierName": "a"
},
"start":24,"end":25,"loc":{"start":{"line":2,"column":6},"end":{"line":2,"column":7},"identifierName":"a"},
"name": "a"
},
"init": {
"type": "NumericLiteral",
"start": 28,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 10
},
"end": {
"line": 2,
"column": 11
}
},
"start":28,"end":29,"loc":{"start":{"line":2,"column":10},"end":{"line":2,"column":11}},
"extra": {
"rawValue": 1,
"raw": "1"
@@ -181,18 +58,7 @@
{
"type": "CommentLine",
"value": " one",
"start": 33,
"end": 39,
"loc": {
"start": {
"line": 3,
"column": 2
},
"end": {
"line": 3,
"column": 8
}
}
"start":33,"end":39,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":8}}
}
]
}
@@ -203,18 +69,7 @@
{
"type": "CommentLine",
"value": " two",
"start": 42,
"end": 48,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 6
}
}
"start":42,"end":48,"loc":{"start":{"line":5,"column":0},"end":{"line":5,"column":6}}
}
]
}
@@ -228,34 +83,12 @@
{
"type": "CommentLine",
"value": " one",
"start": 33,
"end": 39,
"loc": {
"start": {
"line": 3,
"column": 2
},
"end": {
"line": 3,
"column": 8
}
}
"start":33,"end":39,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":8}}
},
{
"type": "CommentLine",
"value": " two",
"start": 42,
"end": 48,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 6
}
}
"start":42,"end":48,"loc":{"start":{"line":5,"column":0},"end":{"line":5,"column":6}}
}
]
}