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

132 lines
3.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 157,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 27,
"end": 30,
"ctxt": 0
},
"value": "gen",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 17,
"end": 157,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 33,
"end": 157,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 126,
"end": 155,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 130,
"end": 154,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 130,
"end": 131,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 134,
"end": 154,
"ctxt": 0
},
"argument": {
"type": "TemplateLiteral",
"span": {
"start": 140,
"end": 154,
"ctxt": 0
},
"expressions": [
{
"type": "Identifier",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"value": "x",
"optional": false
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"tail": false,
"cooked": "abc",
"raw": "abc"
},
{
"type": "TemplateElement",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"tail": true,
"cooked": "def",
"raw": "def"
}
]
},
"delegate": false
},
"definite": false
}
]
}
]
},
"generator": true,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}