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

507 lines
12 KiB
JSON

{
"type": "Script",
"span": {
"start": 168,
"end": 416,
"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": 241,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 220,
"end": 240,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 220,
"end": 233,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 220,
"end": 227,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 227,
"end": 233,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 228,
"end": 232,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 236,
"end": 240,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 242,
"end": 263,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 242,
"end": 262,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 242,
"end": 255,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 242,
"end": 249,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 249,
"end": 255,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 250,
"end": 254,
"ctxt": 0
},
"value": "_str",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 258,
"end": 262,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 264,
"end": 281,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 264,
"end": 280,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 264,
"end": 273,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 264,
"end": 271,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 272,
"end": 273,
"ctxt": 0
},
"value": "S",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 276,
"end": 280,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 305,
"end": 370,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 311,
"end": 369,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 311,
"end": 312,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 315,
"end": 369,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 315,
"end": 322,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 323,
"end": 368,
"ctxt": 0
},
"value": "./lateBoundAssignmentDeclarationSupport1.js",
"raw": "\"./lateBoundAssignmentDeclarationSupport1.js\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 371,
"end": 398,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 377,
"end": 397,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 381,
"end": 397,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 381,
"end": 382,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 382,
"end": 397,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 383,
"end": 396,
"ctxt": 0
},
"value": "my-fake-sym",
"raw": "\"my-fake-sym\""
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 399,
"end": 416,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 405,
"end": 415,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 405,
"end": 406,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 409,
"end": 415,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 409,
"end": 410,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 410,
"end": 415,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 411,
"end": 414,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 411,
"end": 412,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 413,
"end": 414,
"ctxt": 0
},
"value": "S",
"optional": false
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}