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

1452 lines
33 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 493,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 17,
"end": 34,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 21,
"end": 33,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 21,
"end": 25,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 25,
"end": 33,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 27,
"end": 33,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 36,
"end": 47,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 36,
"end": 46,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 36,
"end": 40,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 48,
"end": 70,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 48,
"end": 69,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 48,
"end": 52,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 57,
"end": 69,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 57,
"end": 61,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 65,
"end": 69,
"ctxt": 0
},
"value": "comp",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 71,
"end": 98,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 71,
"end": 97,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 71,
"end": 75,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 80,
"end": 97,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 80,
"end": 84,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 88,
"end": 97,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 88,
"end": 92,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 99,
"end": 125,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 99,
"end": 124,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 99,
"end": 103,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 108,
"end": 124,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "BinaryExpression",
"span": {
"start": 108,
"end": 120,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 108,
"end": 112,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 116,
"end": 120,
"ctxt": 0
},
"value": "comp",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 123,
"end": 124,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 126,
"end": 152,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 126,
"end": 151,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 126,
"end": 130,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 135,
"end": 151,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "BinaryExpression",
"span": {
"start": 135,
"end": 147,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 135,
"end": 139,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 143,
"end": 147,
"ctxt": 0
},
"value": "comp",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 153,
"end": 179,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 153,
"end": 178,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 153,
"end": 157,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 162,
"end": 178,
"ctxt": 0
},
"operator": "*",
"left": {
"type": "BinaryExpression",
"span": {
"start": 162,
"end": 174,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 162,
"end": 166,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 170,
"end": 174,
"ctxt": 0
},
"value": "comp",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 180,
"end": 206,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 180,
"end": 205,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 180,
"end": 184,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 189,
"end": 205,
"ctxt": 0
},
"operator": "/",
"left": {
"type": "BinaryExpression",
"span": {
"start": 189,
"end": 201,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 189,
"end": 193,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 197,
"end": 201,
"ctxt": 0
},
"value": "comp",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 204,
"end": 205,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 207,
"end": 233,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 207,
"end": 232,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 207,
"end": 211,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 216,
"end": 232,
"ctxt": 0
},
"operator": "%",
"left": {
"type": "BinaryExpression",
"span": {
"start": 216,
"end": 228,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 216,
"end": 220,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 224,
"end": 228,
"ctxt": 0
},
"value": "comp",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 234,
"end": 259,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 234,
"end": 258,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 234,
"end": 238,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 243,
"end": 258,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 243,
"end": 253,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 244,
"end": 252,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "Identifier",
"span": {
"start": 244,
"end": 248,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 251,
"end": 252,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 257,
"end": 258,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 260,
"end": 285,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 260,
"end": 284,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 260,
"end": 264,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 269,
"end": 284,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 269,
"end": 279,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 270,
"end": 278,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "Identifier",
"span": {
"start": 270,
"end": 274,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 283,
"end": 284,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 286,
"end": 311,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 286,
"end": 310,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 286,
"end": 290,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 295,
"end": 310,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 295,
"end": 305,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 296,
"end": 304,
"ctxt": 0
},
"operator": "*",
"left": {
"type": "Identifier",
"span": {
"start": 296,
"end": 300,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 303,
"end": 304,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 309,
"end": 310,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 312,
"end": 337,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 312,
"end": 336,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 312,
"end": 316,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 321,
"end": 336,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 321,
"end": 331,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 322,
"end": 330,
"ctxt": 0
},
"operator": "/",
"left": {
"type": "Identifier",
"span": {
"start": 322,
"end": 326,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 329,
"end": 330,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 338,
"end": 363,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 338,
"end": 362,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 338,
"end": 342,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 347,
"end": 362,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ParenthesisExpression",
"span": {
"start": 347,
"end": 357,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 348,
"end": 356,
"ctxt": 0
},
"operator": "%",
"left": {
"type": "Identifier",
"span": {
"start": 348,
"end": 352,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 361,
"end": 362,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 364,
"end": 389,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 364,
"end": 388,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 364,
"end": 368,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 373,
"end": 388,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 373,
"end": 377,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 381,
"end": 388,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 382,
"end": 387,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 382,
"end": 383,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 390,
"end": 415,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 390,
"end": 414,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 390,
"end": 394,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 399,
"end": 414,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 399,
"end": 403,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 407,
"end": 414,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 408,
"end": 413,
"ctxt": 0
},
"operator": "-",
"left": {
"type": "NumericLiteral",
"span": {
"start": 408,
"end": 409,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 412,
"end": 413,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 416,
"end": 441,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 416,
"end": 440,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 416,
"end": 420,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 425,
"end": 440,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 425,
"end": 429,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 433,
"end": 440,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 434,
"end": 439,
"ctxt": 0
},
"operator": "*",
"left": {
"type": "NumericLiteral",
"span": {
"start": 434,
"end": 435,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 438,
"end": 439,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 442,
"end": 467,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 442,
"end": 466,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 442,
"end": 446,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 451,
"end": 466,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 451,
"end": 455,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 459,
"end": 466,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 460,
"end": 465,
"ctxt": 0
},
"operator": "/",
"left": {
"type": "NumericLiteral",
"span": {
"start": 460,
"end": 461,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 464,
"end": 465,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 468,
"end": 493,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 468,
"end": 492,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 468,
"end": 472,
"ctxt": 0
},
"value": "comp",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 477,
"end": 492,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 477,
"end": 481,
"ctxt": 0
},
"value": "comp",
"optional": false
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 485,
"end": 492,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 486,
"end": 491,
"ctxt": 0
},
"operator": "%",
"left": {
"type": "NumericLiteral",
"span": {
"start": 486,
"end": 487,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 490,
"end": 491,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
}
}
}
],
"interpreter": null
}