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

527 lines
12 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 167,
"end": 415,
"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": 240,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 219,
"end": 239,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 219,
"end": 232,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 219,
"end": 226,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 226,
"end": 232,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 227,
"end": 231,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 235,
"end": 239,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 241,
"end": 262,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 241,
"end": 261,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 241,
"end": 254,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 241,
"end": 248,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 248,
"end": 254,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 249,
"end": 253,
"ctxt": 0
},
"value": "_str",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 257,
"end": 261,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 263,
"end": 280,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 263,
"end": 279,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 263,
"end": 272,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 263,
"end": 270,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "S",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 275,
"end": 279,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 304,
"end": 369,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 310,
"end": 368,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 314,
"end": 368,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 314,
"end": 321,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 322,
"end": 367,
"ctxt": 0
},
"value": "./lateBoundAssignmentDeclarationSupport1.js",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 370,
"end": 397,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 376,
"end": 396,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 376,
"end": 377,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 380,
"end": 396,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 380,
"end": 381,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 381,
"end": 396,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 382,
"end": 395,
"ctxt": 0
},
"value": "my-fake-sym",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 398,
"end": 415,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 404,
"end": 414,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 404,
"end": 405,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 408,
"end": 414,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 408,
"end": 409,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 409,
"end": 414,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 410,
"end": 413,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 410,
"end": 411,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 412,
"end": 413,
"ctxt": 0
},
"value": "S",
"optional": false
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}