Debian Codegraph @

packages/babel-parser/test/fixtures/core/scope/for-var/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":32,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":32}},
4 "errors": [
5 "SyntaxError: Identifier 'i' has already been declared. (2:8)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":32,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":32}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ForStatement",
15 "start":0,"end":32,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":32}},
16 "init": {
17 "type": "VariableDeclaration",
18 "start":5,"end":14,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":14,"index":14}},
19 "declarations": [
20 {
21 "type": "VariableDeclarator",
22 "start":9,"end":14,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":14,"index":14}},
23 "id": {
24 "type": "Identifier",
25 "start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10},"identifierName":"i"},
26 "name": "i"
27 },
28 "init": {
29 "type": "NumericLiteral",
30 "start":13,"end":14,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":14,"index":14}},
31 "extra": {
32 "rawValue": 0,
33 "raw": "0"
34 },
35 "value": 0
36 }
37 }
38 ],
39 "kind": "let"
40 },
41 "test": null,
42 "update": null,
43 "body": {
44 "type": "BlockStatement",
45 "start":18,"end":32,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":3,"column":1,"index":32}},
46 "body": [
47 {
48 "type": "VariableDeclaration",
49 "start":24,"end":30,"loc":{"start":{"line":2,"column":4,"index":24},"end":{"line":2,"column":10,"index":30}},
50 "declarations": [
51 {
52 "type": "VariableDeclarator",
53 "start":28,"end":29,"loc":{"start":{"line":2,"column":8,"index":28},"end":{"line":2,"column":9,"index":29}},
54 "id": {
55 "type": "Identifier",
56 "start":28,"end":29,"loc":{"start":{"line":2,"column":8,"index":28},"end":{"line":2,"column":9,"index":29},"identifierName":"i"},
57 "name": "i"
58 },
59 "init": null
60 }
61 ],
62 "kind": "var"
63 }
64 ],
65 "directives": []
66 }
67 }
68 ],
69 "directives": []
70 }
71 }