Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":28,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":28,"index":28}},
4 "errors": [
5 "SyntaxError: Async functions can only be declared at the top level or inside a block. (1:5)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":28,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":28,"index":28}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "LabeledStatement",
15 "start":0,"end":28,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":28,"index":28}},
16 "body": {
17 "type": "FunctionDeclaration",
18 "start":5,"end":28,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":28,"index":28}},
19 "id": {
20 "type": "Identifier",
21 "start":20,"end":23,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":23,"index":23},"identifierName":"bar"},
22 "name": "bar"
23 },
24 "generator": false,
25 "async": true,
26 "params": [],
27 "body": {
28 "type": "BlockStatement",
29 "start":26,"end":28,"loc":{"start":{"line":1,"column":26,"index":26},"end":{"line":1,"column":28,"index":28}},
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 }