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,63 +1,18 @@
{
"type": "File",
"start": 0,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 68
}
},
"start":0,"end":68,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":68}},
"program": {
"type": "Program",
"start": 0,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 68
}
},
"start":0,"end":68,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":68}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start": 0,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 68
}
},
"start":0,"end":68,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":68}},
"id": {
"type": "Identifier",
"start": 9,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 10
},
"identifierName": "f"
},
"start":9,"end":10,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":10},"identifierName":"f"},
"name": "f"
},
"generator": false,
@@ -65,63 +20,19 @@
"params": [],
"body": {
"type": "BlockStatement",
"start": 13,
"end": 68,
"loc": {
"start": {
"line": 1,
"column": 13
},
"end": {
"line": 1,
"column": 68
}
},
"start":13,"end":68,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":68}},
"body": [
{
"type": "WhileStatement",
"start": 30,
"end": 46,
"loc": {
"start": {
"line": 1,
"column": 30
},
"end": {
"line": 1,
"column": 46
}
},
"start":30,"end":46,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":46}},
"test": {
"type": "BooleanLiteral",
"start": 37,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 41
}
},
"start":37,"end":41,"loc":{"start":{"line":1,"column":37},"end":{"line":1,"column":41}},
"value": true
},
"body": {
"type": "BlockStatement",
"start": 43,
"end": 46,
"loc": {
"start": {
"line": 1,
"column": 43
},
"end": {
"line": 1,
"column": 46
}
},
"start":43,"end":46,"loc":{"start":{"line":1,"column":43},"end":{"line":1,"column":46}},
"body": [],
"directives": []
},
@@ -129,83 +40,27 @@
{
"type": "CommentBlock",
"value": " infinite ",
"start": 15,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 29
}
}
"start":15,"end":29,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":29}}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": " bar ",
"start": 47,
"end": 56,
"loc": {
"start": {
"line": 1,
"column": 47
},
"end": {
"line": 1,
"column": 56
}
}
"start":47,"end":56,"loc":{"start":{"line":1,"column":47},"end":{"line":1,"column":56}}
}
]
},
{
"type": "VariableDeclaration",
"start": 57,
"end": 66,
"loc": {
"start": {
"line": 1,
"column": 57
},
"end": {
"line": 1,
"column": 66
}
},
"start":57,"end":66,"loc":{"start":{"line":1,"column":57},"end":{"line":1,"column":66}},
"declarations": [
{
"type": "VariableDeclarator",
"start": 61,
"end": 65,
"loc": {
"start": {
"line": 1,
"column": 61
},
"end": {
"line": 1,
"column": 65
}
},
"start":61,"end":65,"loc":{"start":{"line":1,"column":61},"end":{"line":1,"column":65}},
"id": {
"type": "Identifier",
"start": 61,
"end": 65,
"loc": {
"start": {
"line": 1,
"column": 61
},
"end": {
"line": 1,
"column": 65
},
"identifierName": "each"
},
"start":61,"end":65,"loc":{"start":{"line":1,"column":61},"end":{"line":1,"column":65},"identifierName":"each"},
"name": "each"
},
"init": null
@@ -216,18 +71,7 @@
{
"type": "CommentBlock",
"value": " bar ",
"start": 47,
"end": 56,
"loc": {
"start": {
"line": 1,
"column": 47
},
"end": {
"line": 1,
"column": 56
}
}
"start":47,"end":56,"loc":{"start":{"line":1,"column":47},"end":{"line":1,"column":56}}
}
]
}
@@ -242,34 +86,12 @@
{
"type": "CommentBlock",
"value": " infinite ",
"start": 15,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 29
}
}
"start":15,"end":29,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":29}}
},
{
"type": "CommentBlock",
"value": " bar ",
"start": 47,
"end": 56,
"loc": {
"start": {
"line": 1,
"column": 47
},
"end": {
"line": 1,
"column": 56
}
}
"start":47,"end":56,"loc":{"start":{"line":1,"column":47},"end":{"line":1,"column":56}}
}
]
}