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

1090 lines
25 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 168,
"end": 663,
"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": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 229,
"end": 230,
"ctxt": 0
},
"value": "F",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 220,
"end": 236,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 233,
"end": 236,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 237,
"end": 267,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 237,
"end": 266,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 237,
"end": 259,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 237,
"end": 248,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 237,
"end": 238,
"ctxt": 0
},
"value": "F",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 239,
"end": 248,
"ctxt": 0
},
"value": "prototype",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 249,
"end": 259,
"ctxt": 0
},
"value": "defsAClass",
"optional": false
}
},
"right": {
"type": "BooleanLiteral",
"span": {
"start": 262,
"end": 266,
"ctxt": 0
},
"value": true
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 268,
"end": 324,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 268,
"end": 323,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 268,
"end": 289,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 268,
"end": 274,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 275,
"end": 289,
"ctxt": 0
},
"value": "defineProperty",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 290,
"end": 301,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 290,
"end": 291,
"ctxt": 0
},
"value": "F",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 292,
"end": 301,
"ctxt": 0
},
"value": "prototype",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 303,
"end": 307,
"ctxt": 0
},
"value": "_str",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 309,
"end": 322,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 310,
"end": 315,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 317,
"end": 321,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 325,
"end": 381,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 325,
"end": 380,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 325,
"end": 346,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 325,
"end": 331,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 332,
"end": 346,
"ctxt": 0
},
"value": "defineProperty",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 347,
"end": 358,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 347,
"end": 348,
"ctxt": 0
},
"value": "F",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 349,
"end": 358,
"ctxt": 0
},
"value": "prototype",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 360,
"end": 364,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 366,
"end": 379,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 367,
"end": 372,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 374,
"end": 378,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 382,
"end": 404,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 388,
"end": 403,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 388,
"end": 392,
"ctxt": 0
},
"value": "inst",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 396,
"end": 403,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 400,
"end": 401,
"ctxt": 0
},
"value": "F",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 405,
"end": 427,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 411,
"end": 426,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 411,
"end": 413,
"ctxt": 0
},
"value": "_y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 416,
"end": 426,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 416,
"end": 420,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 420,
"end": 426,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 421,
"end": 425,
"ctxt": 0
},
"value": "_str",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 428,
"end": 450,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 434,
"end": 449,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 434,
"end": 436,
"ctxt": 0
},
"value": "_z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 439,
"end": 449,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 439,
"end": 443,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 443,
"end": 449,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 444,
"end": 448,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 451,
"end": 472,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 451,
"end": 471,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 451,
"end": 467,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 451,
"end": 465,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 451,
"end": 457,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 458,
"end": 465,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 466,
"end": 467,
"ctxt": 0
},
"value": "F",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 470,
"end": 471,
"ctxt": 0
},
"value": "F",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 473,
"end": 497,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 473,
"end": 496,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 473,
"end": 489,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 473,
"end": 487,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 473,
"end": 479,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 480,
"end": 487,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 488,
"end": 489,
"ctxt": 0
},
"value": "S",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 492,
"end": 496,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 521,
"end": 586,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 527,
"end": 585,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 527,
"end": 528,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 531,
"end": 585,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 531,
"end": 538,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 539,
"end": 584,
"ctxt": 0
},
"value": "./lateBoundAssignmentDeclarationSupport6.js",
"raw": "\"./lateBoundAssignmentDeclarationSupport6.js\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 587,
"end": 611,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 593,
"end": 610,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 593,
"end": 597,
"ctxt": 0
},
"value": "inst",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 601,
"end": 610,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 605,
"end": 608,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 605,
"end": 606,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 607,
"end": 608,
"ctxt": 0
},
"value": "F",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 612,
"end": 642,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 618,
"end": 641,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 618,
"end": 619,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 622,
"end": 641,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 622,
"end": 626,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 626,
"end": 641,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 627,
"end": 640,
"ctxt": 0
},
"value": "my-fake-sym",
"raw": "\"my-fake-sym\""
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 643,
"end": 663,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 649,
"end": 662,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 649,
"end": 650,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 653,
"end": 662,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 653,
"end": 657,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 657,
"end": 662,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 658,
"end": 661,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 658,
"end": 659,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 660,
"end": 661,
"ctxt": 0
},
"value": "S",
"optional": false
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}