Debian Codegraph @

packages/babel-parser/test/fixtures/es2017/async-functions/invalid-generator-inside-loop/output.json

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