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,95 +1,28 @@
{
"type": "File",
"start": 0,
"end": 91,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 7,
"column": 1
}
},
"start":0,"end":91,"loc":{"start":{"line":1,"column":0},"end":{"line":7,"column":1}},
"program": {
"type": "Program",
"start": 0,
"end": 91,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 7,
"column": 1
}
},
"start":0,"end":91,"loc":{"start":{"line":1,"column":0},"end":{"line":7,"column":1}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "SwitchStatement",
"start": 0,
"end": 91,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 7,
"column": 1
}
},
"start":0,"end":91,"loc":{"start":{"line":1,"column":0},"end":{"line":7,"column":1}},
"discriminant": {
"type": "Identifier",
"start": 7,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 10
},
"identifierName": "foo"
},
"start":7,"end":10,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":10},"identifierName":"foo"},
"name": "foo"
},
"cases": [
{
"type": "SwitchCase",
"start": 29,
"end": 36,
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 11
}
},
"start":29,"end":36,"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":11}},
"consequent": [],
"test": {
"type": "NumericLiteral",
"start": 34,
"end": 35,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 10
}
},
"start":34,"end":35,"loc":{"start":{"line":3,"column":9},"end":{"line":3,"column":10}},
"extra": {
"rawValue": 1,
"raw": "1"
@@ -100,97 +33,30 @@
{
"type": "CommentLine",
"value": " foo",
"start": 18,
"end": 24,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 10
}
}
"start":18,"end":24,"loc":{"start":{"line":2,"column":4},"end":{"line":2,"column":10}}
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " falls through",
"start": 45,
"end": 61,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
}
"start":45,"end":61,"loc":{"start":{"line":4,"column":8},"end":{"line":4,"column":24}}
}
]
},
{
"type": "SwitchCase",
"start": 66,
"end": 89,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 6,
"column": 15
}
},
"start":66,"end":89,"loc":{"start":{"line":5,"column":4},"end":{"line":6,"column":15}},
"consequent": [
{
"type": "ExpressionStatement",
"start": 82,
"end": 89,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 15
}
},
"start":82,"end":89,"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":15}},
"expression": {
"type": "CallExpression",
"start": 82,
"end": 88,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 14
}
},
"start":82,"end":88,"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":14}},
"callee": {
"type": "Identifier",
"start": 82,
"end": 86,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 12
},
"identifierName": "doIt"
},
"start":82,"end":86,"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":12},"identifierName":"doIt"},
"name": "doIt"
},
"arguments": []
@@ -199,18 +65,7 @@
],
"test": {
"type": "NumericLiteral",
"start": 71,
"end": 72,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 10
}
},
"start":71,"end":72,"loc":{"start":{"line":5,"column":9},"end":{"line":5,"column":10}},
"extra": {
"rawValue": 2,
"raw": "2"
@@ -221,18 +76,7 @@
{
"type": "CommentLine",
"value": " falls through",
"start": 45,
"end": 61,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
}
"start":45,"end":61,"loc":{"start":{"line":4,"column":8},"end":{"line":4,"column":24}}
}
]
}
@@ -245,34 +89,12 @@
{
"type": "CommentLine",
"value": " foo",
"start": 18,
"end": 24,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 10
}
}
"start":18,"end":24,"loc":{"start":{"line":2,"column":4},"end":{"line":2,"column":10}}
},
{
"type": "CommentLine",
"value": " falls through",
"start": 45,
"end": 61,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
}
"start":45,"end":61,"loc":{"start":{"line":4,"column":8},"end":{"line":4,"column":24}}
}
]
}