swc/crates/swc_ecma_parser/tests/tsc/YieldExpression8_es6.json

124 lines
2.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 62,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 17,
"end": 28,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 17,
"end": 27,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 17,
"end": 22,
"ctxt": 0
},
"value": "yield",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 23,
"end": 26,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 39,
"end": 42,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 29,
"end": 62,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 45,
"end": 62,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 49,
"end": 60,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 49,
"end": 59,
"ctxt": 0
},
"argument": {
"type": "ParenthesisExpression",
"span": {
"start": 54,
"end": 59,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 55,
"end": 58,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"delegate": false
}
}
]
},
"generator": true,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}