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

152 lines
4.1 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 17,
"end": 105,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 26,
"end": 29,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 17,
"end": 105,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 32,
"end": 105,
"ctxt": 0
},
"stmts": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 45,
"end": 48,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 36,
"end": 103,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 51,
"end": 103,
"ctxt": 0
},
"stmts": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 67,
"end": 71,
"ctxt": 0
},
"value": "quux",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 57,
"end": 99,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 74,
"end": 99,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 82,
"end": 93,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 82,
"end": 92,
"ctxt": 0
},
"argument": {
"type": "ParenthesisExpression",
"span": {
"start": 87,
"end": 92,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 88,
"end": 91,
"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
}