swc/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithTemplateStringInvalid.json
2022-03-22 07:54:08 +00:00

1081 lines
25 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 290,
"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": "BinaryExpression",
"span": {
"start": 25,
"end": 38,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 30,
"end": 38,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 31,
"end": 31,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 37,
"end": 37,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
}
},
"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": "BinaryExpression",
"span": {
"start": 48,
"end": 62,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 53,
"end": 62,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 61,
"end": 61,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 64,
"end": 87,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 68,
"end": 86,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 72,
"end": 86,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 77,
"end": 86,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 81,
"end": 82,
"ctxt": 0
},
"value": 3.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": "4",
"raw": "4"
}
]
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 88,
"end": 112,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 92,
"end": 111,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 96,
"end": 111,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 101,
"end": 111,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 109,
"end": 110,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 113,
"end": 135,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 117,
"end": 134,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 117,
"end": 118,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 121,
"end": 134,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 121,
"end": 129,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 125,
"end": 126,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 122,
"end": 122,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 128,
"end": 128,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 133,
"end": 134,
"ctxt": 0
},
"value": 5.0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 136,
"end": 159,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 140,
"end": 158,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 144,
"end": 158,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 144,
"end": 153,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 152,
"end": 152,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"value": 5.0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 160,
"end": 183,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 164,
"end": 182,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"value": "g",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 168,
"end": 182,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 168,
"end": 177,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 172,
"end": 173,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 169,
"end": 169,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 181,
"end": 182,
"ctxt": 0
},
"value": 5.0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 184,
"end": 208,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 188,
"end": 207,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 188,
"end": 189,
"ctxt": 0
},
"value": "h",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 192,
"end": 207,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 192,
"end": 202,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 197,
"end": 198,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 193,
"end": 194,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 206,
"end": 207,
"ctxt": 0
},
"value": 5.0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 210,
"end": 221,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 214,
"end": 220,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 218,
"end": 220,
"ctxt": 0
},
"value": 10.0
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 222,
"end": 237,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 222,
"end": 236,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 228,
"end": 236,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 229,
"end": 229,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 235,
"end": 235,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 238,
"end": 254,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 238,
"end": 253,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 238,
"end": 239,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 244,
"end": 253,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 245,
"end": 246,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 252,
"end": 252,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 255,
"end": 272,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 255,
"end": 271,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 255,
"end": 256,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 261,
"end": 271,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 262,
"end": 263,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 269,
"end": 270,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 273,
"end": 290,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 273,
"end": 289,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 279,
"end": 289,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 284,
"end": 285,
"ctxt": 0
},
"value": 3.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 280,
"end": 281,
"ctxt": 0
},
"tail": false,
"cooked": "2",
"raw": "2"
},
{
"type": "TemplateElement",
"span": {
"start": 287,
"end": 288,
"ctxt": 0
},
"tail": true,
"cooked": "4",
"raw": "4"
}
]
}
}
}
],
"interpreter": null
}