Debian Codegraph @

packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-3/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":41,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":41}},
4 "errors": [
5 "SyntaxError: Yield expression is not allowed in formal parameters. (2:9)",
6 "SyntaxError: Binding invalid left-hand side in function parameter list. (2:9)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":41,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":41}},
11 "sourceType": "script",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "FunctionDeclaration",
16 "start":0,"end":41,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":41}},
17 "id": {
18 "type": "Identifier",
19 "start":10,"end":12,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":12,"index":12},"identifierName":"fn"},
20 "name": "fn"
21 },
22 "generator": true,
23 "async": false,
24 "params": [],
25 "body": {
26 "type": "BlockStatement",
27 "start":15,"end":41,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":3,"column":1,"index":41}},
28 "body": [
29 {
30 "type": "ExpressionStatement",
31 "start":19,"end":39,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":22,"index":39}},
32 "expression": {
33 "type": "ArrowFunctionExpression",
34 "start":19,"end":38,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":21,"index":38}},
35 "id": null,
36 "generator": false,
37 "async": false,
38 "params": [
39 {
40 "type": "Identifier",
41 "start":20,"end":21,"loc":{"start":{"line":2,"column":3,"index":20},"end":{"line":2,"column":4,"index":21},"identifierName":"a"},
42 "name": "a"
43 },
44 {
45 "type": "Identifier",
46 "start":23,"end":24,"loc":{"start":{"line":2,"column":6,"index":23},"end":{"line":2,"column":7,"index":24},"identifierName":"b"},
47 "name": "b"
48 },
49 {
50 "type": "YieldExpression",
51 "start":26,"end":31,"loc":{"start":{"line":2,"column":9,"index":26},"end":{"line":2,"column":14,"index":31}},
52 "delegate": false,
53 "argument": null
54 }
55 ],
56 "body": {
57 "type": "BlockStatement",
58 "start":36,"end":38,"loc":{"start":{"line":2,"column":19,"index":36},"end":{"line":2,"column":21,"index":38}},
59 "body": [],
60 "directives": []
61 }
62 }
63 }
64 ],
65 "directives": []
66 }
67 }
68 ],
69 "directives": []
70 }
71 }