Debian Codegraph @

packages/babel-parser/test/fixtures/es2015/yield/function-name-function-declaration-inside-generator/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":40}},
4 "errors": [
5 "SyntaxError: Can not use 'yield' as identifier inside a generator. (2:11)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":40}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":40}},
16 "id": {
17 "type": "Identifier",
18 "start":10,"end":12,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":12,"index":12},"identifierName":"fn"},
19 "name": "fn"
20 },
21 "generator": true,
22 "async": false,
23 "params": [],
24 "body": {
25 "type": "BlockStatement",
26 "start":15,"end":40,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":3,"column":1,"index":40}},
27 "body": [
28 {
29 "type": "FunctionDeclaration",
30 "start":19,"end":38,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":21,"index":38}},
31 "id": {
32 "type": "Identifier",
33 "start":28,"end":33,"loc":{"start":{"line":2,"column":11,"index":28},"end":{"line":2,"column":16,"index":33},"identifierName":"yield"},
34 "name": "yield"
35 },
36 "generator": false,
37 "async": false,
38 "params": [],
39 "body": {
40 "type": "BlockStatement",
41 "start":36,"end":38,"loc":{"start":{"line":2,"column":19,"index":36},"end":{"line":2,"column":21,"index":38}},
42 "body": [],
43 "directives": []
44 }
45 }
46 ],
47 "directives": []
48 }
49 }
50 ],
51 "directives": []
52 }
53 }