43 lines
1.5 KiB
JSON
43 lines
1.5 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},
|
|
"errors": [
|
|
"SyntaxError: Generators can only be declared at the top level or inside a block (1:13)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "LabeledStatement",
|
|
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},
|
|
"body": {
|
|
"type": "FunctionDeclaration",
|
|
"start":5,"end":23,"loc":{"start":{"line":1,"column":5},"end":{"line":1,"column":23}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":15,"end":18,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":18},"identifierName":"bar"},
|
|
"name": "bar"
|
|
},
|
|
"generator": true,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":21,"end":23,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":23}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
},
|
|
"label": {
|
|
"type": "Identifier",
|
|
"start":0,"end":3,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":3},"identifierName":"foo"},
|
|
"name": "foo"
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |