Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":53}},
4 "errors": [
5 "SyntaxError: Yield expression is not allowed in formal parameters. (2:15)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":53}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":53}},
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":53,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":3,"column":1,"index":53}},
27 "body": [
28 {
29 "type": "ExpressionStatement",
30 "start":19,"end":51,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":34,"index":51}},
31 "expression": {
32 "type": "ArrowFunctionExpression",
33 "start":19,"end":50,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":33,"index":50}},
34 "id": null,
35 "generator": false,
36 "async": false,
37 "params": [
38 {
39 "type": "AssignmentPattern",
40 "start":20,"end":43,"loc":{"start":{"line":2,"column":3,"index":20},"end":{"line":2,"column":26,"index":43}},
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": "BinaryExpression",
48 "start":24,"end":43,"loc":{"start":{"line":2,"column":7,"index":24},"end":{"line":2,"column":26,"index":43}},
49 "left": {
50 "type": "NumericLiteral",
51 "start":24,"end":25,"loc":{"start":{"line":2,"column":7,"index":24},"end":{"line":2,"column":8,"index":25}},
52 "extra": {
53 "rawValue": 3,
54 "raw": "3"
55 },
56 "value": 3
57 },
58 "operator": "+",
59 "right": {
60 "type": "BinaryExpression",
61 "start":28,"end":43,"loc":{"start":{"line":2,"column":11,"index":28},"end":{"line":2,"column":26,"index":43}},
62 "left": {
63 "type": "CallExpression",
64 "start":28,"end":38,"loc":{"start":{"line":2,"column":11,"index":28},"end":{"line":2,"column":21,"index":38}},
65 "callee": {
66 "type": "MemberExpression",
67 "start":28,"end":31,"loc":{"start":{"line":2,"column":11,"index":28},"end":{"line":2,"column":14,"index":31}},
68 "object": {
69 "type": "Identifier",
70 "start":28,"end":29,"loc":{"start":{"line":2,"column":11,"index":28},"end":{"line":2,"column":12,"index":29},"identifierName":"a"},
71 "name": "a"
72 },
73 "computed": false,
74 "property": {
75 "type": "Identifier",
76 "start":30,"end":31,"loc":{"start":{"line":2,"column":13,"index":30},"end":{"line":2,"column":14,"index":31},"identifierName":"b"},
77 "name": "b"
78 }
79 },
80 "arguments": [
81 {
82 "type": "YieldExpression",
83 "start":32,"end":37,"loc":{"start":{"line":2,"column":15,"index":32},"end":{"line":2,"column":20,"index":37}},
84 "delegate": false,
85 "argument": null
86 }
87 ]
88 },
89 "operator": "**",
90 "right": {
91 "type": "NumericLiteral",
92 "start":42,"end":43,"loc":{"start":{"line":2,"column":25,"index":42},"end":{"line":2,"column":26,"index":43}},
93 "extra": {
94 "rawValue": 2,
95 "raw": "2"
96 },
97 "value": 2
98 }
99 }
100 }
101 }
102 ],
103 "body": {
104 "type": "BlockStatement",
105 "start":48,"end":50,"loc":{"start":{"line":2,"column":31,"index":48},"end":{"line":2,"column":33,"index":50}},
106 "body": [],
107 "directives": []
108 }
109 }
110 }
111 ],
112 "directives": []
113 }
114 }
115 ],
116 "directives": []
117 }
118 }