/
output.json
269 lines (269 loc) 路 8.01 KB
/
output.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
{
"type": "File",
"start":0,"end":26,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":14,"index":26}},
"program": {
"type": "Program",
"start":0,"end":26,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":14,"index":26}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start":0,"end":10,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":10,"index":10}},
"declarations": [
{
"type": "VariableDeclarator",
"start":4,"end":9,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":9,"index":9}},
"id": {
"type": "Identifier",
"start":4,"end":5,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":5,"index":5},"identifierName":"a"},
"name": "a"
},
"init": {
"type": "NumericLiteral",
"start":8,"end":9,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":1,"column":9,"index":9}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
}
],
"kind": "var"
},
{
"type": "VariableDeclaration",
"start":12,"end":26,"loc":{"start":{"line":3,"column":0,"index":12},"end":{"line":3,"column":14,"index":26}},
"declarations": [
{
"type": "VariableDeclarator",
"start":16,"end":25,"loc":{"start":{"line":3,"column":4,"index":16},"end":{"line":3,"column":13,"index":25}},
"id": {
"type": "Identifier",
"start":16,"end":17,"loc":{"start":{"line":3,"column":4,"index":16},"end":{"line":3,"column":5,"index":17},"identifierName":"b"},
"name": "b"
},
"init": {
"type": "BinaryExpression",
"start":20,"end":25,"loc":{"start":{"line":3,"column":8,"index":20},"end":{"line":3,"column":13,"index":25}},
"left": {
"type": "Identifier",
"start":20,"end":21,"loc":{"start":{"line":3,"column":8,"index":20},"end":{"line":3,"column":9,"index":21},"identifierName":"a"},
"name": "a"
},
"operator": "+",
"right": {
"type": "NumericLiteral",
"start":24,"end":25,"loc":{"start":{"line":3,"column":12,"index":24},"end":{"line":3,"column":13,"index":25}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
}
}
],
"kind": "var"
}
],
"directives": []
},
"tokens": [
{
"type": {
"label": "var",
"keyword": "var",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "var",
"start":0,"end":3,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":3,"index":3}}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "a",
"start":4,"end":5,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":5,"index":5}}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "=",
"start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7}}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": 1,
"start":8,"end":9,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":1,"column":9,"index":9}}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10}}
},
{
"type": {
"label": "var",
"keyword": "var",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "var",
"start":12,"end":15,"loc":{"start":{"line":3,"column":0,"index":12},"end":{"line":3,"column":3,"index":15}}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "b",
"start":16,"end":17,"loc":{"start":{"line":3,"column":4,"index":16},"end":{"line":3,"column":5,"index":17}}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "=",
"start":18,"end":19,"loc":{"start":{"line":3,"column":6,"index":18},"end":{"line":3,"column":7,"index":19}}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "a",
"start":20,"end":21,"loc":{"start":{"line":3,"column":8,"index":20},"end":{"line":3,"column":9,"index":21}}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9
},
"value": "+",
"start":22,"end":23,"loc":{"start":{"line":3,"column":10,"index":22},"end":{"line":3,"column":11,"index":23}}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": 1,
"start":24,"end":25,"loc":{"start":{"line":3,"column":12,"index":24},"end":{"line":3,"column":13,"index":25}}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start":25,"end":26,"loc":{"start":{"line":3,"column":13,"index":25},"end":{"line":3,"column":14,"index":26}}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start":26,"end":26,"loc":{"start":{"line":3,"column":14,"index":26},"end":{"line":3,"column":14,"index":26}}
}
]
}