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":26,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":26,"index":26}},
|
|
"errors": [
|
|
"SyntaxError: 'yield' is only allowed within generator functions. (1:15)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":26,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":26,"index":26}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":0,"end":26,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":26,"index":26}},
|
|
"expression": {
|
|
"type": "FunctionExpression",
|
|
"start":1,"end":25,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":25,"index":25}},
|
|
"id": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":13,"end":25,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":25,"index":25}},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":15,"end":23,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":23,"index":23}},
|
|
"expression": {
|
|
"type": "YieldExpression",
|
|
"start":15,"end":23,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":23,"index":23}},
|
|
"delegate": false,
|
|
"argument": {
|
|
"type": "NumericLiteral",
|
|
"start":21,"end":23,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":23,"index":23}},
|
|
"extra": {
|
|
"rawValue": 10,
|
|
"raw": "10"
|
|
},
|
|
"value": 10
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
},
|
|
"extra": {
|
|
"parenthesized": true,
|
|
"parenStart": 0
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|