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

228 lines
5.0 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 17,
"end": 114,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 17,
"end": 39,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 21,
"end": 38,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 25,
"end": 38,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 26,
"end": 37,
"ctxt": 0
},
"tail": true,
"cooked": "helloworld",
"raw": "hello\\world"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 40,
"end": 63,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 44,
"end": 62,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 44,
"end": 45,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 48,
"end": 62,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 49,
"end": 61,
"ctxt": 0
},
"tail": true,
"cooked": "hello\\world",
"raw": "hello\\\\world"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 64,
"end": 88,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 68,
"end": 87,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 72,
"end": 87,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 73,
"end": 86,
"ctxt": 0
},
"tail": true,
"cooked": "hello\\world",
"raw": "hello\\\\\\world"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 89,
"end": 114,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 93,
"end": 113,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 93,
"end": 94,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 97,
"end": 113,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 98,
"end": 112,
"ctxt": 0
},
"tail": true,
"cooked": "hello\\\\world",
"raw": "hello\\\\\\\\world"
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}