Debian Codegraph @

packages/babel-parser/test/fixtures/es2015/generators/invalid-sloppy-function/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: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement. (1:10)"
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": "WhileStatement",
15 "start":0,"end":28,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":28,"index":28}},
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":28,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":28,"index":28}},
28 "id": {
29 "type": "Identifier",
30 "start":20,"end":23,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":23,"index":23},"identifierName":"foo"},
31 "name": "foo"
32 },
33 "generator": true,
34 "async": false,
35 "params": [],
36 "body": {
37 "type": "BlockStatement",
38 "start":26,"end":28,"loc":{"start":{"line":1,"column":26,"index":26},"end":{"line":1,"column":28,"index":28}},
39 "body": [],
40 "directives": []
41 }
42 }
43 }
44 ],
45 "directives": []
46 }
47 }