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

347 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 157,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 17,
"end": 157,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 21,
"end": 156,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 25,
"end": 156,
"ctxt": 0
},
"operator": "||",
"left": {
"type": "BinaryExpression",
"span": {
"start": 25,
"end": 47,
"ctxt": 0
},
"operator": "===",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 25,
"end": 37,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 31,
"end": 32,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 26,
"end": 29,
"ctxt": 0
},
"tail": false,
"cooked": "abc",
"raw": "abc"
},
{
"type": "TemplateElement",
"span": {
"start": 33,
"end": 36,
"ctxt": 0
},
"tail": true,
"cooked": "abc",
"raw": "abc"
}
]
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 42,
"end": 47,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 43,
"end": 46,
"ctxt": 0
},
"tail": true,
"cooked": "abc",
"raw": "abc"
}
]
}
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 59,
"end": 156,
"ctxt": 0
},
"operator": "&&",
"left": {
"type": "BinaryExpression",
"span": {
"start": 59,
"end": 118,
"ctxt": 0
},
"operator": "&&",
"left": {
"type": "BinaryExpression",
"span": {
"start": 59,
"end": 81,
"ctxt": 0
},
"operator": "!==",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 59,
"end": 64,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 60,
"end": 63,
"ctxt": 0
},
"tail": true,
"cooked": "abc",
"raw": "abc"
}
]
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 69,
"end": 81,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 70,
"end": 73,
"ctxt": 0
},
"tail": false,
"cooked": "abc",
"raw": "abc"
},
{
"type": "TemplateElement",
"span": {
"start": 77,
"end": 80,
"ctxt": 0
},
"tail": true,
"cooked": "abc",
"raw": "abc"
}
]
}
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 93,
"end": 118,
"ctxt": 0
},
"operator": "==",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 93,
"end": 105,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 94,
"end": 97,
"ctxt": 0
},
"tail": false,
"cooked": "abc",
"raw": "abc"
},
{
"type": "TemplateElement",
"span": {
"start": 101,
"end": 104,
"ctxt": 0
},
"tail": true,
"cooked": "abc",
"raw": "abc"
}
]
},
"right": {
"type": "StringLiteral",
"span": {
"start": 109,
"end": 118,
"ctxt": 0
},
"value": "abc0abc",
"raw": "\"abc0abc\""
}
}
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 130,
"end": 156,
"ctxt": 0
},
"operator": "!==",
"left": {
"type": "StringLiteral",
"span": {
"start": 130,
"end": 139,
"ctxt": 0
},
"value": "abc0abc",
"raw": "\"abc0abc\""
},
"right": {
"type": "TemplateLiteral",
"span": {
"start": 144,
"end": 156,
"ctxt": 0
},
"expressions": [
{
"type": "NumericLiteral",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 145,
"end": 148,
"ctxt": 0
},
"tail": false,
"cooked": "abc",
"raw": "abc"
},
{
"type": "TemplateElement",
"span": {
"start": 152,
"end": 155,
"ctxt": 0
},
"tail": true,
"cooked": "abc",
"raw": "abc"
}
]
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}