mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* allowYieldOutsideFunction * dts * review * template * Revert "template" This reverts commit 324e0893f51b5c8dd2c9f546e0cd3cc4441c5b56. * improve error * review
58 lines
2.1 KiB
JSON
58 lines
2.1 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
|
|
"errors": [
|
|
"SyntaxError: 'yield' is only allowed within generator functions. (1:14)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
|
|
"expression": {
|
|
"type": "FunctionExpression",
|
|
"start":1,"end":24,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":24,"index":24}},
|
|
"id": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":12,"end":24,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":24,"index":24}},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":14,"end":22,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":22,"index":22}},
|
|
"expression": {
|
|
"type": "YieldExpression",
|
|
"start":14,"end":21,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":21,"index":21}},
|
|
"delegate": false,
|
|
"argument": {
|
|
"type": "NumericLiteral",
|
|
"start":20,"end":21,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":21,"index":21}},
|
|
"extra": {
|
|
"rawValue": 3,
|
|
"raw": "3"
|
|
},
|
|
"value": 3
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
},
|
|
"extra": {
|
|
"parenthesized": true,
|
|
"parenStart": 0
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|