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

561 lines
13 KiB
JSON

{
"type": "Script",
"span": {
"start": 168,
"end": 437,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 168,
"end": 190,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 174,
"end": 189,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 174,
"end": 178,
"ctxt": 0
},
"value": "_sym",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 181,
"end": 189,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 181,
"end": 187,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 191,
"end": 218,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 197,
"end": 217,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 197,
"end": 201,
"ctxt": 0
},
"value": "_str",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 204,
"end": 217,
"ctxt": 0
},
"value": "my-fake-sym",
"raw": "\"my-fake-sym\""
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 220,
"end": 248,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 220,
"end": 247,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 220,
"end": 240,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 220,
"end": 234,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 220,
"end": 226,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 227,
"end": 234,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Computed",
"span": {
"start": 234,
"end": 240,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 235,
"end": 239,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 243,
"end": 247,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 249,
"end": 277,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 249,
"end": 276,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 249,
"end": 269,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 249,
"end": 263,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 249,
"end": 255,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 256,
"end": 263,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Computed",
"span": {
"start": 263,
"end": 269,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 264,
"end": 268,
"ctxt": 0
},
"value": "_str",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 272,
"end": 276,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 278,
"end": 302,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 278,
"end": 301,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 278,
"end": 294,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 278,
"end": 292,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 278,
"end": 284,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 285,
"end": 292,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"value": "S",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 297,
"end": 301,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 326,
"end": 391,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 332,
"end": 390,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 332,
"end": 333,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 336,
"end": 390,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 336,
"end": 343,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 344,
"end": 389,
"ctxt": 0
},
"value": "./lateBoundAssignmentDeclarationSupport2.js",
"raw": "\"./lateBoundAssignmentDeclarationSupport2.js\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 392,
"end": 419,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 398,
"end": 418,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 398,
"end": 399,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 402,
"end": 418,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 402,
"end": 403,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 403,
"end": 418,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 404,
"end": 417,
"ctxt": 0
},
"value": "my-fake-sym",
"raw": "\"my-fake-sym\""
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 420,
"end": 437,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 426,
"end": 436,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 426,
"end": 427,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 430,
"end": 436,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 430,
"end": 431,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 431,
"end": 436,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 432,
"end": 435,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 432,
"end": 433,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 434,
"end": 435,
"ctxt": 0
},
"value": "S",
"optional": false
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}