swc/crates/swc_ecma_parser/tests/tsc/parserS7.2_A1.5_T2.json

330 lines
8.1 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"type": "Script",
"span": {
"start": 320,
"end": 553,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 320,
"end": 355,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 320,
"end": 354,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 320,
"end": 324,
"ctxt": 0
},
"value": "eval",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 325,
"end": 353,
"ctxt": 0
},
"value": " var x = 1 ",
"raw": "\"\\u00A0var x\\u00A0= 1\\u00A0\""
}
}
],
"typeArguments": null
}
},
{
"type": "IfStatement",
"span": {
"start": 356,
"end": 452,
"ctxt": 0
},
"test": {
"type": "BinaryExpression",
"span": {
"start": 360,
"end": 367,
"ctxt": 0
},
"operator": "!==",
"left": {
"type": "Identifier",
"span": {
"start": 360,
"end": 361,
"ctxt": 0
},
"value": "x",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 366,
"end": 367,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 369,
"end": 452,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 373,
"end": 450,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 373,
"end": 449,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 373,
"end": 379,
"ctxt": 0
},
"value": "$ERROR",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "BinaryExpression",
"span": {
"start": 380,
"end": 448,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 380,
"end": 442,
"ctxt": 0
},
"value": "#1: eval(\"\\u00A0var x\\u00A0= 1\\u00A0\"); x === 1. Actual: ",
"raw": "'#1: eval(\"\\\\u00A0var x\\\\u00A0= 1\\\\u00A0\"); x === 1. Actual: '"
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 445,
"end": 448,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 446,
"end": 447,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
}
],
"typeArguments": null
}
}
]
},
"alternate": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 466,
"end": 479,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 470,
"end": 476,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 470,
"end": 471,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 475,
"end": 476,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
},
{
"type": "IfStatement",
"span": {
"start": 480,
"end": 553,
"ctxt": 0
},
"test": {
"type": "BinaryExpression",
"span": {
"start": 484,
"end": 491,
"ctxt": 0
},
"operator": "!==",
"left": {
"type": "Identifier",
"span": {
"start": 484,
"end": 485,
"ctxt": 0
},
"value": "x",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 490,
"end": 491,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 493,
"end": 553,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 497,
"end": 551,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 497,
"end": 550,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 497,
"end": 503,
"ctxt": 0
},
"value": "$ERROR",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "BinaryExpression",
"span": {
"start": 504,
"end": 549,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 504,
"end": 543,
"ctxt": 0
},
"value": "#2:  var x = 1 ; x === 1. Actual: ",
"raw": "'#2:  var x = 1 ; x === 1. Actual: '"
},
"right": {
"type": "ParenthesisExpression",
"span": {
"start": 546,
"end": 549,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 547,
"end": 548,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
}
],
"typeArguments": null
}
}
]
},
"alternate": null
}
],
"interpreter": null
}