Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":49,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":49}},
4 "errors": [
5 "SyntaxError: Yield expression is not allowed in formal parameters. (2:17)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":49,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":49}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":49,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":49}},
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":49,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":3,"column":1,"index":49}},
27 "body": [
28 {
29 "type": "ExpressionStatement",
30 "start":19,"end":47,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":30,"index":47}},
31 "expression": {
32 "type": "ArrowFunctionExpression",
33 "start":19,"end":46,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":29,"index":46}},
34 "id": null,
35 "generator": false,
36 "async": false,
37 "params": [
38 {
39 "type": "Identifier",
40 "start":20,"end":21,"loc":{"start":{"line":2,"column":3,"index":20},"end":{"line":2,"column":4,"index":21},"identifierName":"a"},
41 "name": "a"
42 },
43 {
44 "type": "AssignmentPattern",
45 "start":23,"end":28,"loc":{"start":{"line":2,"column":6,"index":23},"end":{"line":2,"column":11,"index":28}},
46 "left": {
47 "type": "Identifier",
48 "start":23,"end":24,"loc":{"start":{"line":2,"column":6,"index":23},"end":{"line":2,"column":7,"index":24},"identifierName":"b"},
49 "name": "b"
50 },
51 "right": {
52 "type": "NumericLiteral",
53 "start":27,"end":28,"loc":{"start":{"line":2,"column":10,"index":27},"end":{"line":2,"column":11,"index":28}},
54 "extra": {
55 "rawValue": 3,
56 "raw": "3"
57 },
58 "value": 3
59 }
60 },
61 {
62 "type": "AssignmentPattern",
63 "start":30,"end":39,"loc":{"start":{"line":2,"column":13,"index":30},"end":{"line":2,"column":22,"index":39}},
64 "left": {
65 "type": "Identifier",
66 "start":30,"end":31,"loc":{"start":{"line":2,"column":13,"index":30},"end":{"line":2,"column":14,"index":31},"identifierName":"x"},
67 "name": "x"
68 },
69 "right": {
70 "type": "YieldExpression",
71 "start":34,"end":39,"loc":{"start":{"line":2,"column":17,"index":34},"end":{"line":2,"column":22,"index":39}},
72 "delegate": false,
73 "argument": null
74 }
75 }
76 ],
77 "body": {
78 "type": "BlockStatement",
79 "start":44,"end":46,"loc":{"start":{"line":2,"column":27,"index":44},"end":{"line":2,"column":29,"index":46}},
80 "body": [],
81 "directives": []
82 }
83 }
84 }
85 ],
86 "directives": []
87 }
88 }
89 ],
90 "directives": []
91 }
92 }