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

1146 lines
27 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 304,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 12,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 11,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 9,
"end": 11,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 10,
"end": 10,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 14,
"end": 31,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 18,
"end": 30,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 18,
"end": 19,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 22,
"end": 30,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 23,
"end": 23,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 29,
"end": 29,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 33,
"end": 51,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 37,
"end": 50,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 41,
"end": 50,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 49,
"end": 49,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 53,
"end": 71,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 57,
"end": 70,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 61,
"end": 70,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 65,
"end": 66,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 62,
"end": 62,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"tail": true,
"cooked": "2",
"raw": "2"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 73,
"end": 92,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 77,
"end": 91,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 81,
"end": 91,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 89,
"end": 90,
"ctxt": 0
},
"tail": true,
"cooked": "2",
"raw": "2"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 94,
"end": 117,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 98,
"end": 116,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 102,
"end": 116,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 112,
"end": 113,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 103,
"end": 103,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 109,
"end": 109,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 115,
"end": 115,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 119,
"end": 143,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 123,
"end": 142,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 123,
"end": 124,
"ctxt": 0
},
"value": "g",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 127,
"end": 142,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 132,
"end": 133,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 135,
"end": 135,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 141,
"end": 141,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 145,
"end": 169,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 149,
"end": 168,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": "h",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 153,
"end": 168,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 154,
"end": 154,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 167,
"end": 167,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 171,
"end": 196,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 175,
"end": 195,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 179,
"end": 195,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 184,
"end": 185,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 191,
"end": 192,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 180,
"end": 181,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 187,
"end": 188,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 194,
"end": 194,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 198,
"end": 222,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 202,
"end": 221,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"value": "j",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 206,
"end": 221,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 207,
"end": 207,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 213,
"end": 213,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"tail": true,
"cooked": "3",
"raw": "3"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 224,
"end": 249,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 228,
"end": 248,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 232,
"end": 248,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 237,
"end": 238,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 243,
"end": 244,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 240,
"end": 240,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"tail": true,
"cooked": "3",
"raw": "3"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 251,
"end": 276,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 255,
"end": 275,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 255,
"end": 256,
"ctxt": 0
},
"value": "l",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 259,
"end": 275,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 260,
"end": 260,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"tail": true,
"cooked": "3",
"raw": "3"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 278,
"end": 304,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 282,
"end": 303,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 286,
"end": 303,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 291,
"end": 292,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 287,
"end": 288,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 294,
"end": 295,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 301,
"end": 302,
"ctxt": 0
},
"tail": true,
"cooked": "3",
"raw": "3"
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}