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

248 lines
5.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 122,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 15,
"end": 36,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 19,
"end": 35,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 19,
"end": 21,
"ctxt": 0
},
"value": "r1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 24,
"end": 35,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NullLiteral",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
}
},
"right": {
"type": "NullLiteral",
"span": {
"start": 31,
"end": 35,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 37,
"end": 63,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 41,
"end": 62,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 41,
"end": 43,
"ctxt": 0
},
"value": "r2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 46,
"end": 62,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NullLiteral",
"span": {
"start": 46,
"end": 50,
"ctxt": 0
}
},
"right": {
"type": "Identifier",
"span": {
"start": 53,
"end": 62,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 64,
"end": 90,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 68,
"end": 89,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 68,
"end": 70,
"ctxt": 0
},
"value": "r3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 73,
"end": 89,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "Identifier",
"span": {
"start": 73,
"end": 82,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"right": {
"type": "NullLiteral",
"span": {
"start": 85,
"end": 89,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 91,
"end": 122,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 95,
"end": 121,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 95,
"end": 97,
"ctxt": 0
},
"value": "r4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 100,
"end": 121,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "Identifier",
"span": {
"start": 100,
"end": 109,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 112,
"end": 121,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
"definite": false
}
]
}
],
"interpreter": null
}