Debian Codegraph @

packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/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:8)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":41,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":41}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":41,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":41}},
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":41,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":3,"column":1,"index":41}},
27 "body": [
28 {
29 "type": "ExpressionStatement",
30 "start":19,"end":39,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":22,"index":39}},
31 "expression": {
32 "type": "ArrowFunctionExpression",
33 "start":19,"end":38,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":21,"index":38}},
34 "id": null,
35 "generator": false,
36 "async": false,
37 "params": [
38 {
39 "type": "AssignmentPattern",
40 "start":20,"end":31,"loc":{"start":{"line":2,"column":3,"index":20},"end":{"line":2,"column":14,"index":31}},
41 "left": {
42 "type": "Identifier",
43 "start":20,"end":21,"loc":{"start":{"line":2,"column":3,"index":20},"end":{"line":2,"column":4,"index":21},"identifierName":"x"},
44 "name": "x"
45 },
46 "right": {
47 "type": "YieldExpression",
48 "start":25,"end":30,"loc":{"start":{"line":2,"column":8,"index":25},"end":{"line":2,"column":13,"index":30}},
49 "delegate": false,
50 "argument": null,
51 "extra": {
52 "parenthesized": true,
53 "parenStart": 24
54 }
55 }
56 }
57 ],
58 "body": {
59 "type": "BlockStatement",
60 "start":36,"end":38,"loc":{"start":{"line":2,"column":19,"index":36},"end":{"line":2,"column":21,"index":38}},
61 "body": [],
62 "directives": []
63 }
64 }
65 }
66 ],
67 "directives": []
68 }
69 }
70 ],
71 "directives": []
72 }
73 }