Debian Codegraph @

packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0141/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":19,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":19,"index":19}},
4 "errors": [
5 "SyntaxError: Lexical declaration cannot appear in a single-statement context. (1:9)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":19,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":19,"index":19}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "IfStatement",
15 "start":0,"end":19,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":19,"index":19}},
16 "test": {
17 "type": "BooleanLiteral",
18 "start":3,"end":7,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":1,"column":7,"index":7}},
19 "value": true
20 },
21 "consequent": {
22 "type": "VariableDeclaration",
23 "start":9,"end":19,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":19,"index":19}},
24 "declarations": [
25 {
26 "type": "VariableDeclarator",
27 "start":13,"end":18,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":18,"index":18}},
28 "id": {
29 "type": "Identifier",
30 "start":13,"end":14,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":14,"index":14},"identifierName":"a"},
31 "name": "a"
32 },
33 "init": {
34 "type": "NumericLiteral",
35 "start":17,"end":18,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":1,"column":18,"index":18}},
36 "extra": {
37 "rawValue": 1,
38 "raw": "1"
39 },
40 "value": 1
41 }
42 }
43 ],
44 "kind": "let"
45 },
46 "alternate": null
47 }
48 ],
49 "directives": []
50 }
51 }