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

873 lines
20 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 110,
"end": 448,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 110,
"end": 125,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 114,
"end": 124,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 114,
"end": 115,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 115,
"end": 124,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 117,
"end": 124,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 126,
"end": 140,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 130,
"end": 139,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 130,
"end": 131,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 131,
"end": 139,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 133,
"end": 139,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 141,
"end": 155,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 145,
"end": 154,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 146,
"end": 154,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 148,
"end": 154,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 148,
"end": 154,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 172,
"end": 193,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 176,
"end": 192,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 176,
"end": 180,
"ctxt": 0
},
"value": "r1a1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 183,
"end": 192,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 183,
"end": 187,
"ctxt": 0
}
},
"right": {
"type": "Identifier",
"span": {
"start": 191,
"end": 192,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 194,
"end": 215,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 198,
"end": 214,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 198,
"end": 202,
"ctxt": 0
},
"value": "r1a2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 205,
"end": 214,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 205,
"end": 209,
"ctxt": 0
}
},
"right": {
"type": "Identifier",
"span": {
"start": 213,
"end": 214,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 216,
"end": 237,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 220,
"end": 236,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 220,
"end": 224,
"ctxt": 0
},
"value": "r1a3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 227,
"end": 236,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 227,
"end": 231,
"ctxt": 0
}
},
"right": {
"type": "Identifier",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 239,
"end": 260,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 243,
"end": 259,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 243,
"end": 247,
"ctxt": 0
},
"value": "r1b1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 250,
"end": 259,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 250,
"end": 251,
"ctxt": 0
},
"value": "a",
"optional": false
},
"right": {
"type": "NullLiteral",
"span": {
"start": 255,
"end": 259,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 261,
"end": 282,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 265,
"end": 281,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 265,
"end": 269,
"ctxt": 0
},
"value": "r1b2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 272,
"end": 281,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 272,
"end": 273,
"ctxt": 0
},
"value": "b",
"optional": false
},
"right": {
"type": "NullLiteral",
"span": {
"start": 277,
"end": 281,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 283,
"end": 304,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 287,
"end": 303,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 287,
"end": 291,
"ctxt": 0
},
"value": "r1b3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 294,
"end": 303,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 294,
"end": 295,
"ctxt": 0
},
"value": "c",
"optional": false
},
"right": {
"type": "NullLiteral",
"span": {
"start": 299,
"end": 303,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 306,
"end": 330,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 310,
"end": 329,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 310,
"end": 314,
"ctxt": 0
},
"value": "r1c1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 317,
"end": 329,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 317,
"end": 321,
"ctxt": 0
}
},
"right": {
"type": "BooleanLiteral",
"span": {
"start": 325,
"end": 329,
"ctxt": 0
},
"value": true
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 331,
"end": 353,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 335,
"end": 352,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 335,
"end": 339,
"ctxt": 0
},
"value": "r1c2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 342,
"end": 352,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 342,
"end": 346,
"ctxt": 0
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 350,
"end": 352,
"ctxt": 0
},
"value": "",
"raw": "''"
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 354,
"end": 376,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 358,
"end": 375,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 358,
"end": 362,
"ctxt": 0
},
"value": "r1c3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 365,
"end": 375,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 365,
"end": 369,
"ctxt": 0
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 373,
"end": 375,
"ctxt": 0
},
"properties": []
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 378,
"end": 402,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 382,
"end": 401,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 382,
"end": 386,
"ctxt": 0
},
"value": "r1d1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 389,
"end": 401,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "BooleanLiteral",
"span": {
"start": 389,
"end": 393,
"ctxt": 0
},
"value": true
},
"right": {
"type": "NullLiteral",
"span": {
"start": 397,
"end": 401,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 403,
"end": 425,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 407,
"end": 424,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 407,
"end": 411,
"ctxt": 0
},
"value": "r1d2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 414,
"end": 424,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "StringLiteral",
"span": {
"start": 414,
"end": 416,
"ctxt": 0
},
"value": "",
"raw": "''"
},
"right": {
"type": "NullLiteral",
"span": {
"start": 420,
"end": 424,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 426,
"end": 448,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 430,
"end": 447,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 430,
"end": 434,
"ctxt": 0
},
"value": "r1d3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 437,
"end": 447,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ObjectExpression",
"span": {
"start": 437,
"end": 439,
"ctxt": 0
},
"properties": []
},
"right": {
"type": "NullLiteral",
"span": {
"start": 443,
"end": 447,
"ctxt": 0
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}