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

1105 lines
26 KiB
JSON

{
"type": "Script",
"span": {
"start": 79,
"end": 379,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 79,
"end": 102,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 104,
"end": 115,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 108,
"end": 114,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 109,
"end": 114,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 111,
"end": 114,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 116,
"end": 130,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 120,
"end": 129,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 121,
"end": 129,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 123,
"end": 129,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 131,
"end": 140,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 135,
"end": 139,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 135,
"end": 136,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 136,
"end": 139,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 157,
"end": 173,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 161,
"end": 172,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 161,
"end": 163,
"ctxt": 0
},
"value": "r1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 166,
"end": 172,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"value": "c",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 171,
"end": 172,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 174,
"end": 190,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 178,
"end": 189,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 178,
"end": 180,
"ctxt": 0
},
"value": "r2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 183,
"end": 189,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 183,
"end": 184,
"ctxt": 0
},
"value": "c",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 188,
"end": 189,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 191,
"end": 207,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 195,
"end": 206,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 195,
"end": 197,
"ctxt": 0
},
"value": "r3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 200,
"end": 206,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"value": "c",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 205,
"end": 206,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 208,
"end": 224,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 212,
"end": 223,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 212,
"end": 214,
"ctxt": 0
},
"value": "r4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 217,
"end": 223,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 217,
"end": 218,
"ctxt": 0
},
"value": "a",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 225,
"end": 241,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 229,
"end": 240,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 229,
"end": 231,
"ctxt": 0
},
"value": "r5",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 234,
"end": 240,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": "b",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 239,
"end": 240,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 242,
"end": 260,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 246,
"end": 259,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 246,
"end": 248,
"ctxt": 0
},
"value": "r6",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 251,
"end": 259,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "MemberExpression",
"span": {
"start": 251,
"end": 254,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 251,
"end": 252,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 253,
"end": 254,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 258,
"end": 259,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 261,
"end": 279,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 265,
"end": 278,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 265,
"end": 267,
"ctxt": 0
},
"value": "r7",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 270,
"end": 278,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "MemberExpression",
"span": {
"start": 270,
"end": 273,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 272,
"end": 273,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 280,
"end": 300,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 284,
"end": 299,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 284,
"end": 286,
"ctxt": 0
},
"value": "r8",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 289,
"end": 299,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "MemberExpression",
"span": {
"start": 289,
"end": 292,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 289,
"end": 290,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 291,
"end": 292,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "MemberExpression",
"span": {
"start": 296,
"end": 299,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 296,
"end": 297,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 301,
"end": 319,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 305,
"end": 318,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 305,
"end": 307,
"ctxt": 0
},
"value": "r9",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 310,
"end": 318,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "MemberExpression",
"span": {
"start": 310,
"end": 313,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 317,
"end": 318,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 320,
"end": 339,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 324,
"end": 338,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 324,
"end": 327,
"ctxt": 0
},
"value": "r10",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 330,
"end": 338,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 330,
"end": 331,
"ctxt": 0
},
"value": "a",
"optional": false
},
"right": {
"type": "MemberExpression",
"span": {
"start": 335,
"end": 338,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 337,
"end": 338,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 340,
"end": 359,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 344,
"end": 358,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 344,
"end": 347,
"ctxt": 0
},
"value": "r11",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 350,
"end": 358,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 350,
"end": 351,
"ctxt": 0
},
"value": "b",
"optional": false
},
"right": {
"type": "MemberExpression",
"span": {
"start": 355,
"end": 358,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 357,
"end": 358,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 360,
"end": 379,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 364,
"end": 378,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 364,
"end": 367,
"ctxt": 0
},
"value": "r12",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 370,
"end": 378,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 370,
"end": 371,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"right": {
"type": "MemberExpression",
"span": {
"start": 375,
"end": 378,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 375,
"end": 376,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}