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

969 lines
20 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 282,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 0,
"end": 18,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 9,
"end": 10,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 9,
"end": 10,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 12,
"end": 13,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 12,
"end": 13,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"value": "c",
"optional": false
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 20,
"end": 31,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 24,
"end": 30,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 25,
"end": 30,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 27,
"end": 30,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 32,
"end": 46,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 36,
"end": 45,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 36,
"end": 37,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 37,
"end": 45,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 39,
"end": 45,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 47,
"end": 56,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 51,
"end": 55,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 52,
"end": 55,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 58,
"end": 70,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 62,
"end": 69,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 62,
"end": 64,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 64,
"end": 69,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 66,
"end": 69,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 71,
"end": 80,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 71,
"end": 79,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 71,
"end": 73,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 78,
"end": 79,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 81,
"end": 90,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 81,
"end": 89,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 81,
"end": 83,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 91,
"end": 100,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 91,
"end": 99,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 91,
"end": 93,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 101,
"end": 113,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 101,
"end": 112,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 101,
"end": 103,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NullLiteral",
"span": {
"start": 108,
"end": 112,
"ctxt": 0
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 114,
"end": 131,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 114,
"end": 130,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 114,
"end": 116,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 121,
"end": 130,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 133,
"end": 148,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 137,
"end": 147,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 137,
"end": 139,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 139,
"end": 147,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 141,
"end": 147,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 149,
"end": 158,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 149,
"end": 157,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 149,
"end": 151,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 159,
"end": 168,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 159,
"end": 167,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 159,
"end": 161,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 169,
"end": 178,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 169,
"end": 177,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 169,
"end": 171,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 179,
"end": 191,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 179,
"end": 190,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 179,
"end": 181,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NullLiteral",
"span": {
"start": 186,
"end": 190,
"ctxt": 0
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 192,
"end": 209,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 192,
"end": 208,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 192,
"end": 194,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 199,
"end": 208,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 211,
"end": 221,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 215,
"end": 220,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 215,
"end": 217,
"ctxt": 0
},
"value": "x3",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 217,
"end": 220,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 222,
"end": 231,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 222,
"end": 230,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 222,
"end": 224,
"ctxt": 0
},
"value": "x3",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 229,
"end": 230,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 232,
"end": 241,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 232,
"end": 240,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 232,
"end": 234,
"ctxt": 0
},
"value": "x3",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 239,
"end": 240,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 242,
"end": 251,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 242,
"end": 250,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 242,
"end": 244,
"ctxt": 0
},
"value": "x3",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 252,
"end": 264,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 252,
"end": 263,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 252,
"end": 254,
"ctxt": 0
},
"value": "x3",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NullLiteral",
"span": {
"start": 259,
"end": 263,
"ctxt": 0
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 265,
"end": 282,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 265,
"end": 281,
"ctxt": 0
},
"operator": "**=",
"left": {
"type": "Identifier",
"span": {
"start": 265,
"end": 267,
"ctxt": 0
},
"value": "x3",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 272,
"end": 281,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
}
],
"interpreter": null
}