swc/crates/swc_ecma_parser/tests/tsc/templateStringInNewExpression.json
2022-03-22 07:54:08 +00:00

191 lines
4.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 54,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 0,
"end": 54,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 0,
"end": 53,
"ctxt": 0
},
"callee": {
"type": "TemplateLiteral",
"span": {
"start": 4,
"end": 16,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 5,
"end": 8,
"ctxt": 0
},
"tail": false,
"cooked": "abc",
"raw": "abc"
},
{
"type": "TemplateElement",
"span": {
"start": 12,
"end": 15,
"ctxt": 0
},
"tail": true,
"cooked": "abc",
"raw": "abc"
}
]
},
"arguments": [
{
"spread": null,
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 17,
"end": 35,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 18,
"end": 24,
"ctxt": 0
},
"tail": false,
"cooked": "hello ",
"raw": "hello "
},
{
"type": "TemplateElement",
"span": {
"start": 28,
"end": 34,
"ctxt": 0
},
"tail": true,
"cooked": " world",
"raw": " world"
}
]
}
},
{
"spread": null,
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 37,
"end": 42,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 38,
"end": 41,
"ctxt": 0
},
"tail": true,
"cooked": " ",
"raw": " "
}
]
}
},
{
"spread": null,
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 44,
"end": 52,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"value": 2.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"tail": true,
"cooked": "3",
"raw": "3"
}
]
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}