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

1046 lines
25 KiB
JSON

{
"type": "Script",
"span": {
"start": 18,
"end": 316,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 18,
"end": 40,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 22,
"end": 40,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 22,
"end": 28,
"ctxt": 0
},
"value": "array0",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 31,
"end": 40,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 32,
"end": 33,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 41,
"end": 52,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 45,
"end": 51,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 45,
"end": 47,
"ctxt": 0
},
"value": "i0",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 53,
"end": 72,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 53,
"end": 71,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "MemberExpression",
"span": {
"start": 53,
"end": 65,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 53,
"end": 59,
"ctxt": 0
},
"value": "array0",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 59,
"end": 65,
"ctxt": 0
},
"expression": {
"type": "UpdateExpression",
"span": {
"start": 60,
"end": 64,
"ctxt": 0
},
"operator": "++",
"prefix": true,
"argument": {
"type": "Identifier",
"span": {
"start": 62,
"end": 64,
"ctxt": 0
},
"value": "i0",
"optional": false
}
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 74,
"end": 96,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 78,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 78,
"end": 84,
"ctxt": 0
},
"value": "array1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 87,
"end": 96,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 97,
"end": 108,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 101,
"end": 107,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 101,
"end": 103,
"ctxt": 0
},
"value": "i1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 109,
"end": 145,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 109,
"end": 144,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "MemberExpression",
"span": {
"start": 109,
"end": 121,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 109,
"end": 115,
"ctxt": 0
},
"value": "array1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
},
"expression": {
"type": "UpdateExpression",
"span": {
"start": 116,
"end": 120,
"ctxt": 0
},
"operator": "++",
"prefix": true,
"argument": {
"type": "Identifier",
"span": {
"start": 118,
"end": 120,
"ctxt": 0
},
"value": "i1",
"optional": false
}
}
}
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 126,
"end": 144,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "MemberExpression",
"span": {
"start": 126,
"end": 138,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 126,
"end": 132,
"ctxt": 0
},
"value": "array1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 132,
"end": 138,
"ctxt": 0
},
"expression": {
"type": "UpdateExpression",
"span": {
"start": 133,
"end": 137,
"ctxt": 0
},
"operator": "++",
"prefix": true,
"argument": {
"type": "Identifier",
"span": {
"start": 135,
"end": 137,
"ctxt": 0
},
"value": "i1",
"optional": false
}
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 147,
"end": 169,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 151,
"end": 169,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 151,
"end": 157,
"ctxt": 0
},
"value": "array2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 160,
"end": 169,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 161,
"end": 162,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 167,
"end": 168,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 170,
"end": 181,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 174,
"end": 180,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 174,
"end": 176,
"ctxt": 0
},
"value": "i2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 179,
"end": 180,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 182,
"end": 217,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 182,
"end": 216,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "MemberExpression",
"span": {
"start": 182,
"end": 194,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 182,
"end": 188,
"ctxt": 0
},
"value": "array2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 188,
"end": 194,
"ctxt": 0
},
"expression": {
"type": "UpdateExpression",
"span": {
"start": 189,
"end": 193,
"ctxt": 0
},
"operator": "++",
"prefix": true,
"argument": {
"type": "Identifier",
"span": {
"start": 191,
"end": 193,
"ctxt": 0
},
"value": "i2",
"optional": false
}
}
}
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 199,
"end": 216,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "MemberExpression",
"span": {
"start": 199,
"end": 211,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 199,
"end": 205,
"ctxt": 0
},
"value": "array2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 205,
"end": 211,
"ctxt": 0
},
"expression": {
"type": "UpdateExpression",
"span": {
"start": 206,
"end": 210,
"ctxt": 0
},
"operator": "++",
"prefix": true,
"argument": {
"type": "Identifier",
"span": {
"start": 208,
"end": 210,
"ctxt": 0
},
"value": "i2",
"optional": false
}
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 219,
"end": 242,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 223,
"end": 241,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 223,
"end": 229,
"ctxt": 0
},
"value": "array3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 232,
"end": 241,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 239,
"end": 240,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 243,
"end": 262,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 247,
"end": 253,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 247,
"end": 249,
"ctxt": 0
},
"value": "j0",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 255,
"end": 261,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 255,
"end": 257,
"ctxt": 0
},
"value": "j1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 260,
"end": 261,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 263,
"end": 316,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 263,
"end": 315,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "MemberExpression",
"span": {
"start": 263,
"end": 275,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 263,
"end": 269,
"ctxt": 0
},
"value": "array3",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 269,
"end": 275,
"ctxt": 0
},
"expression": {
"type": "UpdateExpression",
"span": {
"start": 270,
"end": 274,
"ctxt": 0
},
"operator": "++",
"prefix": false,
"argument": {
"type": "Identifier",
"span": {
"start": 270,
"end": 272,
"ctxt": 0
},
"value": "j0",
"optional": false
}
}
}
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 280,
"end": 315,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "MemberExpression",
"span": {
"start": 280,
"end": 292,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 280,
"end": 286,
"ctxt": 0
},
"value": "array3",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 286,
"end": 292,
"ctxt": 0
},
"expression": {
"type": "UpdateExpression",
"span": {
"start": 287,
"end": 291,
"ctxt": 0
},
"operator": "++",
"prefix": false,
"argument": {
"type": "Identifier",
"span": {
"start": 287,
"end": 289,
"ctxt": 0
},
"value": "j1",
"optional": false
}
}
}
},
"right": {
"type": "AssignmentExpression",
"span": {
"start": 297,
"end": 315,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "MemberExpression",
"span": {
"start": 297,
"end": 309,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 297,
"end": 303,
"ctxt": 0
},
"value": "array3",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 303,
"end": 309,
"ctxt": 0
},
"expression": {
"type": "UpdateExpression",
"span": {
"start": 304,
"end": 308,
"ctxt": 0
},
"operator": "++",
"prefix": false,
"argument": {
"type": "Identifier",
"span": {
"start": 304,
"end": 306,
"ctxt": 0
},
"value": "j0",
"optional": false
}
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 314,
"end": 315,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
}
}
],
"interpreter": null
}