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

881 lines
20 KiB
JSON

{
"type": "Script",
"span": {
"start": 109,
"end": 447,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 109,
"end": 124,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 113,
"end": 123,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 114,
"end": 123,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 116,
"end": 123,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 125,
"end": 139,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 129,
"end": 138,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 130,
"end": 138,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 132,
"end": 138,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 140,
"end": 154,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 144,
"end": 153,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 144,
"end": 145,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 145,
"end": 153,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 147,
"end": 153,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 147,
"end": 153,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 171,
"end": 192,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 175,
"end": 191,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 175,
"end": 179,
"ctxt": 0
},
"value": "r1a1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 182,
"end": 191,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 182,
"end": 186,
"ctxt": 0
}
},
"right": {
"type": "Identifier",
"span": {
"start": 190,
"end": 191,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 193,
"end": 214,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 197,
"end": 213,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 197,
"end": 201,
"ctxt": 0
},
"value": "r1a2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 204,
"end": 213,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 204,
"end": 208,
"ctxt": 0
}
},
"right": {
"type": "Identifier",
"span": {
"start": 212,
"end": 213,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 215,
"end": 236,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 219,
"end": 235,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 219,
"end": 223,
"ctxt": 0
},
"value": "r1a3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 226,
"end": 235,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 226,
"end": 230,
"ctxt": 0
}
},
"right": {
"type": "Identifier",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": "c",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 238,
"end": 259,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 242,
"end": 258,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 242,
"end": 246,
"ctxt": 0
},
"value": "r1b1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 249,
"end": 258,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"value": "a",
"optional": false
},
"right": {
"type": "NullLiteral",
"span": {
"start": 254,
"end": 258,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 260,
"end": 281,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 264,
"end": 280,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 264,
"end": 268,
"ctxt": 0
},
"value": "r1b2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 271,
"end": 280,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "b",
"optional": false
},
"right": {
"type": "NullLiteral",
"span": {
"start": 276,
"end": 280,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 282,
"end": 303,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 286,
"end": 302,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 286,
"end": 290,
"ctxt": 0
},
"value": "r1b3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 293,
"end": 302,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "Identifier",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"value": "c",
"optional": false
},
"right": {
"type": "NullLiteral",
"span": {
"start": 298,
"end": 302,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 305,
"end": 329,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 309,
"end": 328,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 309,
"end": 313,
"ctxt": 0
},
"value": "r1c1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 316,
"end": 328,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 316,
"end": 320,
"ctxt": 0
}
},
"right": {
"type": "BooleanLiteral",
"span": {
"start": 324,
"end": 328,
"ctxt": 0
},
"value": true
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 330,
"end": 352,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 334,
"end": 351,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 334,
"end": 338,
"ctxt": 0
},
"value": "r1c2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 341,
"end": 351,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 341,
"end": 345,
"ctxt": 0
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 349,
"end": 351,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 353,
"end": 375,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 357,
"end": 374,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 357,
"end": 361,
"ctxt": 0
},
"value": "r1c3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 364,
"end": 374,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "NullLiteral",
"span": {
"start": 364,
"end": 368,
"ctxt": 0
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 372,
"end": 374,
"ctxt": 0
},
"properties": []
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 377,
"end": 401,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 381,
"end": 400,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 381,
"end": 385,
"ctxt": 0
},
"value": "r1d1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 388,
"end": 400,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "BooleanLiteral",
"span": {
"start": 388,
"end": 392,
"ctxt": 0
},
"value": true
},
"right": {
"type": "NullLiteral",
"span": {
"start": 396,
"end": 400,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 402,
"end": 424,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 406,
"end": 423,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 406,
"end": 410,
"ctxt": 0
},
"value": "r1d2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 413,
"end": 423,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "StringLiteral",
"span": {
"start": 413,
"end": 415,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"right": {
"type": "NullLiteral",
"span": {
"start": 419,
"end": 423,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 425,
"end": 447,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 429,
"end": 446,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 429,
"end": 433,
"ctxt": 0
},
"value": "r1d3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 436,
"end": 446,
"ctxt": 0
},
"operator": "**",
"left": {
"type": "ObjectExpression",
"span": {
"start": 436,
"end": 438,
"ctxt": 0
},
"properties": []
},
"right": {
"type": "NullLiteral",
"span": {
"start": 442,
"end": 446,
"ctxt": 0
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}