Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":39,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":39}},
4 "errors": [
5 "SyntaxError: Yield expression is not allowed in formal parameters. (2:7)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":39,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":39}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":39,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":39}},
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":39,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":3,"column":1,"index":39}},
27 "body": [
28 {
29 "type": "ExpressionStatement",
30 "start":19,"end":37,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":20,"index":37}},
31 "expression": {
32 "type": "ArrowFunctionExpression",
33 "start":19,"end":36,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":19,"index":36}},
34 "id": null,
35 "generator": false,
36 "async": false,
37 "params": [
38 {
39 "type": "AssignmentPattern",
40 "start":20,"end":29,"loc":{"start":{"line":2,"column":3,"index":20},"end":{"line":2,"column":12,"index":29}},
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":24,"end":29,"loc":{"start":{"line":2,"column":7,"index":24},"end":{"line":2,"column":12,"index":29}},
49 "delegate": false,
50 "argument": null
51 }
52 }
53 ],
54 "body": {
55 "type": "BlockStatement",
56 "start":34,"end":36,"loc":{"start":{"line":2,"column":17,"index":34},"end":{"line":2,"column":19,"index":36}},
57 "body": [],
58 "directives": []
59 }
60 }
61 }
62 ],
63 "directives": []
64 }
65 }
66 ],
67 "directives": []
68 }
69 }