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

228 lines
5.7 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 42,
"ctxt": 0
},
"body": [
{
"type": "WhileStatement",
"span": {
"start": 0,
"end": 42,
"ctxt": 0
},
"test": {
"type": "TemplateLiteral",
"span": {
"start": 7,
"end": 19,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 8,
"end": 11,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 8,
"end": 11,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 8,
"end": 11,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 15,
"end": 18,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 15,
"end": 18,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 15,
"end": 18,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 21,
"end": 42,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 27,
"end": 40,
"ctxt": 0
},
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 27,
"end": 39,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 33,
"end": 34,
"ctxt": 0
},
"value": 1.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 28,
"end": 31,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 28,
"end": 31,
"ctxt": 0
},
"value": "def",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 28,
"end": 31,
"ctxt": 0
},
"value": "def",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 35,
"end": 38,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 35,
"end": 38,
"ctxt": 0
},
"value": "def",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 35,
"end": 38,
"ctxt": 0
},
"value": "def",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
}
}
]
}
}
],
"interpreter": null
}