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

1102 lines
26 KiB
JSON

{
"type": "Script",
"span": {
"start": 18,
"end": 292,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 18,
"end": 40,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 22,
"end": 39,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 26,
"end": 39,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 31,
"end": 39,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 32,
"end": 32,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 38,
"end": 38,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 41,
"end": 64,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 45,
"end": 63,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 49,
"end": 63,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 54,
"end": 63,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 62,
"end": 62,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 65,
"end": 88,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 69,
"end": 87,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 69,
"end": 70,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 73,
"end": 87,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 78,
"end": 87,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 79,
"end": 79,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 89,
"end": 113,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 93,
"end": 112,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 93,
"end": 94,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 97,
"end": 112,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 102,
"end": 112,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 107,
"end": 108,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 103,
"end": 104,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 114,
"end": 136,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 118,
"end": 135,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 118,
"end": 119,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 122,
"end": 135,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 122,
"end": 130,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 123,
"end": 123,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 129,
"end": 129,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 137,
"end": 160,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 141,
"end": 159,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 145,
"end": 159,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 145,
"end": 154,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 153,
"end": 153,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 161,
"end": 184,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 165,
"end": 183,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": "g",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 169,
"end": 183,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 169,
"end": 178,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 173,
"end": 174,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 170,
"end": 170,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 185,
"end": 209,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 189,
"end": 208,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 189,
"end": 190,
"ctxt": 0
},
"value": "h",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 193,
"end": 208,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 193,
"end": 203,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 194,
"end": 195,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 201,
"end": 202,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 207,
"end": 208,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 211,
"end": 222,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 215,
"end": 221,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 219,
"end": 221,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 223,
"end": 238,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 223,
"end": 237,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 223,
"end": 224,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 229,
"end": 237,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 230,
"end": 230,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 236,
"end": 236,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 239,
"end": 255,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 239,
"end": 254,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 239,
"end": 240,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 245,
"end": 254,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 250,
"end": 251,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 253,
"end": 253,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 256,
"end": 273,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 256,
"end": 272,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 256,
"end": 257,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 262,
"end": 272,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 267,
"end": 268,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 274,
"end": 292,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 274,
"end": 291,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 274,
"end": 276,
"ctxt": 0
},
"value": "kj",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 281,
"end": 291,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 286,
"end": 287,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
],
"quasis": [
{
"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": "4",
"raw": "4"
}
]
}
}
}
],
"interpreter": null
}