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

124 lines
2.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 61,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 16,
"end": 27,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 16,
"end": 26,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 16,
"end": 21,
"ctxt": 0
},
"value": "yield",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 22,
"end": 25,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 38,
"end": 41,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 28,
"end": 61,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 44,
"end": 61,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 48,
"end": 59,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 48,
"end": 58,
"ctxt": 0
},
"argument": {
"type": "ParenthesisExpression",
"span": {
"start": 53,
"end": 58,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"delegate": false
}
}
]
},
"generator": true,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}