Debian Codegraph @

packages/babel-parser/test/fixtures/es2015/statements/label-invalid-const/output.json

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