50 lines
1.7 KiB
JSON
50 lines
1.7 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},
|
|
"errors": [
|
|
"SyntaxError: yield is not allowed in generator parameters (1:17)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":10,"end":12,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":12},"identifierName":"fn"},
|
|
"name": "fn"
|
|
},
|
|
"generator": true,
|
|
"async": false,
|
|
"params": [
|
|
{
|
|
"type": "AssignmentPattern",
|
|
"start":13,"end":22,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":22}},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"start":13,"end":14,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":14},"identifierName":"x"},
|
|
"name": "x"
|
|
},
|
|
"right": {
|
|
"type": "YieldExpression",
|
|
"start":17,"end":22,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":22}},
|
|
"delegate": false,
|
|
"argument": null
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":24,"end":26,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":26}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |