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

673 lines
16 KiB
JSON

{
"type": "Script",
"span": {
"start": 167,
"end": 502,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 167,
"end": 189,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 173,
"end": 188,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 173,
"end": 177,
"ctxt": 0
},
"value": "_sym",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 180,
"end": 188,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 180,
"end": 186,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 190,
"end": 217,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 196,
"end": 216,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 196,
"end": 200,
"ctxt": 0
},
"value": "_str",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 203,
"end": 216,
"ctxt": 0
},
"value": "my-fake-sym",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 219,
"end": 280,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 219,
"end": 279,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 219,
"end": 240,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 219,
"end": 225,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 226,
"end": 240,
"ctxt": 0
},
"value": "defineProperty",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 241,
"end": 255,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 241,
"end": 247,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 248,
"end": 255,
"ctxt": 0
},
"value": "exports",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 257,
"end": 261,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 263,
"end": 278,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 265,
"end": 270,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 272,
"end": 276,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 281,
"end": 342,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 281,
"end": 341,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 281,
"end": 302,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 281,
"end": 287,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 288,
"end": 302,
"ctxt": 0
},
"value": "defineProperty",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 303,
"end": 317,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 303,
"end": 309,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 310,
"end": 317,
"ctxt": 0
},
"value": "exports",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 319,
"end": 323,
"ctxt": 0
},
"value": "_str",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 325,
"end": 340,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 327,
"end": 332,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 334,
"end": 338,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 343,
"end": 367,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 343,
"end": 366,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 343,
"end": 359,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 343,
"end": 357,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 343,
"end": 349,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 350,
"end": 357,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 358,
"end": 359,
"ctxt": 0
},
"value": "S",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 362,
"end": 366,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 391,
"end": 456,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 397,
"end": 455,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 397,
"end": 398,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 401,
"end": 455,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 401,
"end": 408,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 409,
"end": 454,
"ctxt": 0
},
"value": "./lateBoundAssignmentDeclarationSupport3.js",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 457,
"end": 484,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 463,
"end": 483,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 463,
"end": 464,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 467,
"end": 483,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 467,
"end": 468,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 468,
"end": 483,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 469,
"end": 482,
"ctxt": 0
},
"value": "my-fake-sym",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 485,
"end": 502,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 491,
"end": 501,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 491,
"end": 492,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 495,
"end": 501,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 495,
"end": 496,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 496,
"end": 501,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 497,
"end": 500,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 497,
"end": 498,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 499,
"end": 500,
"ctxt": 0
},
"value": "S",
"optional": false
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}