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

1110 lines
26 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 167,
"end": 662,
"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": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"value": "F",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 219,
"end": 235,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 232,
"end": 235,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 236,
"end": 266,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 236,
"end": 265,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 236,
"end": 258,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 236,
"end": 247,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": "F",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 238,
"end": 247,
"ctxt": 0
},
"value": "prototype",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 248,
"end": 258,
"ctxt": 0
},
"value": "defsAClass",
"optional": false
}
},
"right": {
"type": "BooleanLiteral",
"span": {
"start": 261,
"end": 265,
"ctxt": 0
},
"value": true
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 267,
"end": 323,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 267,
"end": 322,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 267,
"end": 288,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 267,
"end": 273,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 274,
"end": 288,
"ctxt": 0
},
"value": "defineProperty",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 289,
"end": 300,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 289,
"end": 290,
"ctxt": 0
},
"value": "F",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 291,
"end": 300,
"ctxt": 0
},
"value": "prototype",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 302,
"end": 306,
"ctxt": 0
},
"value": "_str",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 308,
"end": 321,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 309,
"end": 314,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 316,
"end": 320,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 324,
"end": 380,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 324,
"end": 379,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 324,
"end": 345,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 324,
"end": 330,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 331,
"end": 345,
"ctxt": 0
},
"value": "defineProperty",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 346,
"end": 357,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 346,
"end": 347,
"ctxt": 0
},
"value": "F",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 348,
"end": 357,
"ctxt": 0
},
"value": "prototype",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 359,
"end": 363,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 365,
"end": 378,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 366,
"end": 371,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 373,
"end": 377,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 381,
"end": 403,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 387,
"end": 402,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 387,
"end": 391,
"ctxt": 0
},
"value": "inst",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 395,
"end": 402,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 399,
"end": 400,
"ctxt": 0
},
"value": "F",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 404,
"end": 426,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 410,
"end": 425,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 410,
"end": 412,
"ctxt": 0
},
"value": "_y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 415,
"end": 425,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 415,
"end": 419,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 419,
"end": 425,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 420,
"end": 424,
"ctxt": 0
},
"value": "_str",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 427,
"end": 449,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 433,
"end": 448,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 433,
"end": 435,
"ctxt": 0
},
"value": "_z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 438,
"end": 448,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 438,
"end": 442,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 442,
"end": 448,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 443,
"end": 447,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 450,
"end": 471,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 450,
"end": 470,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 450,
"end": 466,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 450,
"end": 464,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 450,
"end": 456,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 457,
"end": 464,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 465,
"end": 466,
"ctxt": 0
},
"value": "F",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 469,
"end": 470,
"ctxt": 0
},
"value": "F",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 472,
"end": 496,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 472,
"end": 495,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 472,
"end": 488,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 472,
"end": 486,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 472,
"end": 478,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 479,
"end": 486,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 487,
"end": 488,
"ctxt": 0
},
"value": "S",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 491,
"end": 495,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 520,
"end": 585,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 526,
"end": 584,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 526,
"end": 527,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 530,
"end": 584,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 530,
"end": 537,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 538,
"end": 583,
"ctxt": 0
},
"value": "./lateBoundAssignmentDeclarationSupport6.js",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 586,
"end": 610,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 592,
"end": 609,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 592,
"end": 596,
"ctxt": 0
},
"value": "inst",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 600,
"end": 609,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 604,
"end": 607,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 604,
"end": 605,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 606,
"end": 607,
"ctxt": 0
},
"value": "F",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 611,
"end": 641,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 617,
"end": 640,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 617,
"end": 618,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 621,
"end": 640,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 621,
"end": 625,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 625,
"end": 640,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 626,
"end": 639,
"ctxt": 0
},
"value": "my-fake-sym",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 642,
"end": 662,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 648,
"end": 661,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 648,
"end": 649,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 652,
"end": 661,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 652,
"end": 656,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 656,
"end": 661,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 657,
"end": 660,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 657,
"end": 658,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 659,
"end": 660,
"ctxt": 0
},
"value": "S",
"optional": false
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}