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

1563 lines
36 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 526,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 33,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 32,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 24,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 24,
"end": 32,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 26,
"end": 32,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 35,
"end": 46,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 35,
"end": 45,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 35,
"end": 39,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 44,
"end": 45,
"ctxt": 0
},
"value": 1.0
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 47,
"end": 67,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 47,
"end": 66,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 47,
"end": 51,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 56,
"end": 66,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 56,
"end": 60,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 65,
"end": 66,
"ctxt": 0
},
"value": 1.0
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 68,
"end": 92,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 68,
"end": 91,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 68,
"end": 72,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 77,
"end": 91,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 77,
"end": 81,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 86,
"end": 91,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"value": 2.0
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 93,
"end": 117,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 93,
"end": 116,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 93,
"end": 97,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 102,
"end": 116,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 102,
"end": 106,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 111,
"end": 116,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "NumericLiteral",
"span": {
"start": 111,
"end": 112,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": 2.0
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 118,
"end": 142,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 118,
"end": 141,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 118,
"end": 122,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 127,
"end": 141,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 127,
"end": 131,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 136,
"end": 141,
"ctxt": 0
},
"operator": "*",
"left": {
"type": "NumericLiteral",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": 2.0
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 143,
"end": 167,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 143,
"end": 166,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 143,
"end": 147,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 152,
"end": 166,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 152,
"end": 156,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 161,
"end": 166,
"ctxt": 0
},
"operator": "/",
"left": {
"type": "NumericLiteral",
"span": {
"start": 161,
"end": 162,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": 2.0
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 169,
"end": 195,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 169,
"end": 194,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 169,
"end": 173,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 178,
"end": 194,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 178,
"end": 182,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 187,
"end": 194,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 188,
"end": 193,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 188,
"end": 189,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"value": 2.0
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 196,
"end": 222,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 196,
"end": 221,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 196,
"end": 200,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 205,
"end": 221,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 205,
"end": 209,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 214,
"end": 221,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 215,
"end": 220,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "NumericLiteral",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"value": 2.0
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 223,
"end": 249,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 223,
"end": 248,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 223,
"end": 227,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 232,
"end": 248,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 232,
"end": 236,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 241,
"end": 248,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 242,
"end": 247,
"ctxt": 0
},
"operator": "*",
"left": {
"type": "NumericLiteral",
"span": {
"start": 242,
"end": 243,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"value": 2.0
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 250,
"end": 276,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 250,
"end": 275,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 250,
"end": 254,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 259,
"end": 275,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 259,
"end": 263,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 268,
"end": 275,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 269,
"end": 274,
"ctxt": 0
},
"operator": "/",
"left": {
"type": "NumericLiteral",
"span": {
"start": 269,
"end": 270,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": 2.0
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 278,
"end": 307,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 278,
"end": 306,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 278,
"end": 282,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 287,
"end": 306,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 287,
"end": 291,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 296,
"end": 306,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 296,
"end": 297,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 300,
"end": 306,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 300,
"end": 301,
"ctxt": 0
},
"value": 2.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 305,
"end": 306,
"ctxt": 0
},
"value": 3.0
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 308,
"end": 337,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 308,
"end": 336,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 308,
"end": 312,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 317,
"end": 336,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 317,
"end": 321,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 326,
"end": 336,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "NumericLiteral",
"span": {
"start": 326,
"end": 327,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 330,
"end": 336,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 330,
"end": 331,
"ctxt": 0
},
"value": 2.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"value": 4.0
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 338,
"end": 367,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 338,
"end": 366,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 338,
"end": 342,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 347,
"end": 366,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 347,
"end": 351,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 356,
"end": 366,
"ctxt": 0
},
"operator": "*",
"left": {
"type": "NumericLiteral",
"span": {
"start": 356,
"end": 357,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 360,
"end": 366,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 360,
"end": 361,
"ctxt": 0
},
"value": 2.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"value": 5.0
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 368,
"end": 397,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 368,
"end": 396,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 368,
"end": 372,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 377,
"end": 396,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 377,
"end": 381,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 386,
"end": 396,
"ctxt": 0
},
"operator": "/",
"left": {
"type": "NumericLiteral",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 390,
"end": 396,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 390,
"end": 391,
"ctxt": 0
},
"value": 2.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 395,
"end": 396,
"ctxt": 0
},
"value": 6.0
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 399,
"end": 430,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 399,
"end": 429,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 399,
"end": 403,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 408,
"end": 429,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 408,
"end": 412,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 417,
"end": 429,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 417,
"end": 424,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 418,
"end": 423,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 422,
"end": 423,
"ctxt": 0
},
"value": 2.0
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 428,
"end": 429,
"ctxt": 0
},
"value": 3.0
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 431,
"end": 462,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 431,
"end": 461,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 431,
"end": 435,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 440,
"end": 461,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 440,
"end": 444,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 449,
"end": 461,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 449,
"end": 456,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 450,
"end": 455,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "NumericLiteral",
"span": {
"start": 450,
"end": 451,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 454,
"end": 455,
"ctxt": 0
},
"value": 2.0
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 460,
"end": 461,
"ctxt": 0
},
"value": 4.0
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 463,
"end": 494,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 463,
"end": 493,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 463,
"end": 467,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 472,
"end": 493,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 472,
"end": 476,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 481,
"end": 493,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 481,
"end": 488,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 482,
"end": 487,
"ctxt": 0
},
"operator": "*",
"left": {
"type": "NumericLiteral",
"span": {
"start": 482,
"end": 483,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 486,
"end": 487,
"ctxt": 0
},
"value": 2.0
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 492,
"end": 493,
"ctxt": 0
},
"value": 5.0
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 495,
"end": 526,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 495,
"end": 525,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 495,
"end": 499,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 504,
"end": 525,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 504,
"end": 508,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 513,
"end": 525,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 513,
"end": 520,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 514,
"end": 519,
"ctxt": 0
},
"operator": "/",
"left": {
"type": "NumericLiteral",
"span": {
"start": 514,
"end": 515,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 518,
"end": 519,
"ctxt": 0
},
"value": 2.0
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 524,
"end": 525,
"ctxt": 0
},
"value": 6.0
}
}
}
}
}
],
"interpreter": null
}