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

653 lines
15 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 168,
"end": 503,
"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": 281,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 220,
"end": 280,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 220,
"end": 241,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 220,
"end": 226,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 227,
"end": 241,
"ctxt": 0
},
"value": "defineProperty",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 242,
"end": 256,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 242,
"end": 248,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 249,
"end": 256,
"ctxt": 0
},
"value": "exports",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 258,
"end": 262,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 264,
"end": 279,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 266,
"end": 271,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 273,
"end": 277,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 282,
"end": 343,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 282,
"end": 342,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 282,
"end": 303,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 282,
"end": 288,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 289,
"end": 303,
"ctxt": 0
},
"value": "defineProperty",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 304,
"end": 318,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 304,
"end": 310,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 311,
"end": 318,
"ctxt": 0
},
"value": "exports",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 320,
"end": 324,
"ctxt": 0
},
"value": "_str",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 326,
"end": 341,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 328,
"end": 333,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 335,
"end": 339,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 344,
"end": 368,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 344,
"end": 367,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 344,
"end": 360,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 344,
"end": 358,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 344,
"end": 350,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 351,
"end": 358,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 359,
"end": 360,
"ctxt": 0
},
"value": "S",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 363,
"end": 367,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 392,
"end": 457,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 398,
"end": 456,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 398,
"end": 399,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 402,
"end": 456,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 402,
"end": 409,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 410,
"end": 455,
"ctxt": 0
},
"value": "./lateBoundAssignmentDeclarationSupport3.js",
"raw": "\"./lateBoundAssignmentDeclarationSupport3.js\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 458,
"end": 485,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 464,
"end": 484,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 464,
"end": 465,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 468,
"end": 484,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 468,
"end": 469,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 469,
"end": 484,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 470,
"end": 483,
"ctxt": 0
},
"value": "my-fake-sym",
"raw": "\"my-fake-sym\""
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 486,
"end": 503,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 492,
"end": 502,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 492,
"end": 493,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 496,
"end": 502,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 496,
"end": 497,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 497,
"end": 502,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 498,
"end": 501,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 498,
"end": 499,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 500,
"end": 501,
"ctxt": 0
},
"value": "S",
"optional": false
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}