Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":23,"index":23}},
4 "errors": [
5 "SyntaxError: Generators can only be declared at the top level or inside a block. (1:13)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":23,"index":23}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "LabeledStatement",
15 "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":23,"index":23}},
16 "body": {
17 "type": "FunctionDeclaration",
18 "start":5,"end":23,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":23,"index":23}},
19 "id": {
20 "type": "Identifier",
21 "start":15,"end":18,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":18,"index":18},"identifierName":"bar"},
22 "name": "bar"
23 },
24 "generator": true,
25 "async": false,
26 "params": [],
27 "body": {
28 "type": "BlockStatement",
29 "start":21,"end":23,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":23,"index":23}},
30 "body": [],
31 "directives": []
32 }
33 },
34 "label": {
35 "type": "Identifier",
36 "start":0,"end":3,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":3,"index":3},"identifierName":"foo"},
37 "name": "foo"
38 }
39 }
40 ],
41 "directives": []
42 }
43 }