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

373 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 70,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 16,
"end": 70,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 16,
"end": 69,
"ctxt": 0
},
"callee": {
"type": "TemplateLiteral",
"span": {
"start": 20,
"end": 32,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 21,
"end": 24,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 21,
"end": 24,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 21,
"end": 24,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 28,
"end": 31,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 28,
"end": 31,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 28,
"end": 31,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
},
"arguments": [
{
"spread": null,
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 33,
"end": 51,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 34,
"end": 40,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 34,
"end": 40,
"ctxt": 0
},
"value": "hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 34,
"end": 40,
"ctxt": 0
},
"value": "hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 44,
"end": 50,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 44,
"end": 50,
"ctxt": 0
},
"value": " world",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 44,
"end": 50,
"ctxt": 0
},
"value": " world",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
}
},
{
"spread": null,
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 53,
"end": 58,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"value": " ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"value": " ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
}
},
{
"spread": null,
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 60,
"end": 68,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 64,
"end": 65,
"ctxt": 0
},
"value": 2.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"value": "1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"value": "1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"value": "3",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"value": "3",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}