Debian Codegraph @

packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/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: Can not use 'yield' as identifier inside a generator. (1:20)"
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": "FunctionDeclaration",
15 "start":0,"end":28,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":28,"index":28}},
16 "id": {
17 "type": "Identifier",
18 "start":10,"end":11,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":11,"index":11},"identifierName":"g"},
19 "name": "g"
20 },
21 "generator": true,
22 "async": false,
23 "params": [],
24 "body": {
25 "type": "BlockStatement",
26 "start":14,"end":28,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":28,"index":28}},
27 "body": [
28 {
29 "type": "VariableDeclaration",
30 "start":16,"end":26,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":26,"index":26}},
31 "declarations": [
32 {
33 "type": "VariableDeclarator",
34 "start":20,"end":25,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":25,"index":25}},
35 "id": {
36 "type": "Identifier",
37 "start":20,"end":25,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":25,"index":25},"identifierName":"yield"},
38 "name": "yield"
39 },
40 "init": null
41 }
42 ],
43 "kind": "var"
44 }
45 ],
46 "directives": []
47 }
48 }
49 ],
50 "directives": []
51 }
52 }