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

152 lines
4.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 104,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 25,
"end": 28,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 16,
"end": 104,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 31,
"end": 104,
"ctxt": 0
},
"stmts": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 44,
"end": 47,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 35,
"end": 102,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 50,
"end": 102,
"ctxt": 0
},
"stmts": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 66,
"end": 70,
"ctxt": 0
},
"value": "quux",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 56,
"end": 98,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 73,
"end": 98,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 81,
"end": 92,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 81,
"end": 91,
"ctxt": 0
},
"argument": {
"type": "ParenthesisExpression",
"span": {
"start": 86,
"end": 91,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 87,
"end": 90,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"delegate": false
}
}
]
},
"generator": true,
"async": false,
"typeParameters": null,
"returnType": null
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
},
"generator": true,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}