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

177 lines
4.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 17,
"end": 91,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 17,
"end": 91,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 21,
"end": 90,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 25,
"end": 90,
"ctxt": 0
},
"expressions": [
{
"type": "TemplateLiteral",
"span": {
"start": 32,
"end": 52,
"ctxt": 0
},
"expressions": [
{
"type": "StringLiteral",
"span": {
"start": 40,
"end": 45,
"ctxt": 0
},
"value": " | ",
"raw": "\" | \""
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 33,
"end": 37,
"ctxt": 0
},
"tail": false,
"cooked": "456 ",
"raw": "456 "
},
{
"type": "TemplateElement",
"span": {
"start": 47,
"end": 51,
"ctxt": 0
},
"tail": true,
"cooked": " 654",
"raw": " 654"
}
]
},
{
"type": "TemplateLiteral",
"span": {
"start": 64,
"end": 84,
"ctxt": 0
},
"expressions": [
{
"type": "StringLiteral",
"span": {
"start": 72,
"end": 77,
"ctxt": 0
},
"value": " | ",
"raw": "\" | \""
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 65,
"end": 69,
"ctxt": 0
},
"tail": false,
"cooked": "456 ",
"raw": "456 "
},
{
"type": "TemplateElement",
"span": {
"start": 79,
"end": 83,
"ctxt": 0
},
"tail": true,
"cooked": " 654",
"raw": " 654"
}
]
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 26,
"end": 29,
"ctxt": 0
},
"tail": false,
"cooked": "123",
"raw": "123"
},
{
"type": "TemplateElement",
"span": {
"start": 54,
"end": 61,
"ctxt": 0
},
"tail": false,
"cooked": "321 123",
"raw": "321 123"
},
{
"type": "TemplateElement",
"span": {
"start": 86,
"end": 89,
"ctxt": 0
},
"tail": true,
"cooked": "321",
"raw": "321"
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}