swc/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithEnum.json
2022-04-05 12:46:35 +00:00

1105 lines
26 KiB
JSON

{
"type": "Script",
"span": {
"start": 78,
"end": 378,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 78,
"end": 101,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 103,
"end": 114,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 107,
"end": 113,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 107,
"end": 108,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 108,
"end": 113,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 110,
"end": 113,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 115,
"end": 129,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 119,
"end": 128,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 120,
"end": 128,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 122,
"end": 128,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 130,
"end": 139,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 134,
"end": 138,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 135,
"end": 138,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 137,
"end": 138,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 137,
"end": 138,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 156,
"end": 172,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 160,
"end": 171,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 160,
"end": 162,
"ctxt": 0
},
"value": "r1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 165,
"end": 171,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": "c",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 173,
"end": 189,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 177,
"end": 188,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 177,
"end": 179,
"ctxt": 0
},
"value": "r2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 182,
"end": 188,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"value": "c",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 187,
"end": 188,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 190,
"end": 206,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 194,
"end": 205,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 194,
"end": 196,
"ctxt": 0
},
"value": "r3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 199,
"end": 205,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": "c",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 204,
"end": 205,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 207,
"end": 223,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 211,
"end": 222,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 211,
"end": 213,
"ctxt": 0
},
"value": "r4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 216,
"end": 222,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": "a",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 221,
"end": 222,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 224,
"end": 240,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 228,
"end": 239,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 228,
"end": 230,
"ctxt": 0
},
"value": "r5",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 233,
"end": 239,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"value": "b",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 238,
"end": 239,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 241,
"end": 259,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 245,
"end": 258,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 245,
"end": 247,
"ctxt": 0
},
"value": "r6",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 250,
"end": 258,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "MemberExpression",
"span": {
"start": 250,
"end": 253,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 250,
"end": 251,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 257,
"end": 258,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 260,
"end": 278,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 264,
"end": 277,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 264,
"end": 266,
"ctxt": 0
},
"value": "r7",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 269,
"end": 277,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "MemberExpression",
"span": {
"start": 269,
"end": 272,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 269,
"end": 270,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 276,
"end": 277,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 279,
"end": 299,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 283,
"end": 298,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 283,
"end": 285,
"ctxt": 0
},
"value": "r8",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 288,
"end": 298,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "MemberExpression",
"span": {
"start": 288,
"end": 291,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 288,
"end": 289,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 290,
"end": 291,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "MemberExpression",
"span": {
"start": 295,
"end": 298,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 295,
"end": 296,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 300,
"end": 318,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 304,
"end": 317,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 304,
"end": 306,
"ctxt": 0
},
"value": "r9",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 309,
"end": 317,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "MemberExpression",
"span": {
"start": 309,
"end": 312,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 309,
"end": 310,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 311,
"end": 312,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 316,
"end": 317,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 319,
"end": 338,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 323,
"end": 337,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 323,
"end": 326,
"ctxt": 0
},
"value": "r10",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 329,
"end": 337,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 329,
"end": 330,
"ctxt": 0
},
"value": "a",
"optional": false
},
"right": {
"type": "MemberExpression",
"span": {
"start": 334,
"end": 337,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 334,
"end": 335,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 336,
"end": 337,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 339,
"end": 358,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 343,
"end": 357,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 343,
"end": 346,
"ctxt": 0
},
"value": "r11",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 349,
"end": 357,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 349,
"end": 350,
"ctxt": 0
},
"value": "b",
"optional": false
},
"right": {
"type": "MemberExpression",
"span": {
"start": 354,
"end": 357,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 354,
"end": 355,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 356,
"end": 357,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 359,
"end": 378,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 363,
"end": 377,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 363,
"end": 366,
"ctxt": 0
},
"value": "r12",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 369,
"end": 377,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NumericLiteral",
"span": {
"start": 369,
"end": 370,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"right": {
"type": "MemberExpression",
"span": {
"start": 374,
"end": 377,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 374,
"end": 375,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 376,
"end": 377,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}