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

1146 lines
27 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 320,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 17,
"end": 28,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 21,
"end": 27,
"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": 27,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 26,
"end": 26,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 30,
"end": 47,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 34,
"end": 46,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 38,
"end": 46,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 39,
"end": 39,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 45,
"end": 45,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 49,
"end": 67,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 53,
"end": 66,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 53,
"end": 54,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 57,
"end": 66,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 65,
"end": 65,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 69,
"end": 87,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 73,
"end": 86,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 77,
"end": 86,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 81,
"end": 82,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 78,
"end": 78,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"tail": true,
"cooked": "2",
"raw": "2"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 89,
"end": 108,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 93,
"end": 107,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 93,
"end": 94,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 97,
"end": 107,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 105,
"end": 106,
"ctxt": 0
},
"tail": true,
"cooked": "2",
"raw": "2"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 110,
"end": 133,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 114,
"end": 132,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 114,
"end": 115,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 118,
"end": 132,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 119,
"end": 119,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 125,
"end": 125,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 131,
"end": 131,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 135,
"end": 159,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 139,
"end": 158,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 139,
"end": 140,
"ctxt": 0
},
"value": "g",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 143,
"end": 158,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 144,
"end": 145,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 151,
"end": 151,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 157,
"end": 157,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 161,
"end": 185,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 165,
"end": 184,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": "h",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 169,
"end": 184,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 173,
"end": 174,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 180,
"end": 181,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 170,
"end": 170,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 183,
"end": 183,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 187,
"end": 212,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 191,
"end": 211,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 191,
"end": 192,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 195,
"end": 211,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 207,
"end": 208,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 196,
"end": 197,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 210,
"end": 210,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 214,
"end": 238,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 218,
"end": 237,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": "j",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 222,
"end": 237,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 226,
"end": 227,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 223,
"end": 223,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 229,
"end": 229,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"tail": true,
"cooked": "3",
"raw": "3"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 240,
"end": 265,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 244,
"end": 264,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 244,
"end": 245,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 248,
"end": 264,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 253,
"end": 254,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 259,
"end": 260,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 256,
"end": 256,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 262,
"end": 263,
"ctxt": 0
},
"tail": true,
"cooked": "3",
"raw": "3"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 267,
"end": 292,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 271,
"end": 291,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "l",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 275,
"end": 291,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 279,
"end": 280,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 286,
"end": 287,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 276,
"end": 276,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 289,
"end": 290,
"ctxt": 0
},
"tail": true,
"cooked": "3",
"raw": "3"
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 294,
"end": 320,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 298,
"end": 319,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TemplateLiteral",
"span": {
"start": 302,
"end": 319,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 307,
"end": 308,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
{
"type": "NumericLiteral",
"span": {
"start": 314,
"end": 315,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 303,
"end": 304,
"ctxt": 0
},
"tail": false,
"cooked": "1",
"raw": "1"
},
{
"type": "TemplateElement",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 317,
"end": 318,
"ctxt": 0
},
"tail": true,
"cooked": "3",
"raw": "3"
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}