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

1581 lines
59 KiB
JSON

{
"type": "Module",
"span": {
"start": 94,
"end": 975,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 94,
"end": 143,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 107,
"end": 108,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 101,
"end": 143,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 115,
"end": 141,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 115,
"end": 120,
"ctxt": 0
},
"value": "print",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 115,
"end": 141,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 123,
"end": 141,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 125,
"end": 140,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 132,
"end": 140,
"ctxt": 0
},
"value": "I am B",
"raw": "\"I am B\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 145,
"end": 183,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 161,
"end": 164,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 152,
"end": 183,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 167,
"end": 183,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 169,
"end": 181,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 176,
"end": 181,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 204,
"end": 249,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 220,
"end": 226,
"ctxt": 0
},
"value": "backup",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 211,
"end": 249,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 229,
"end": 249,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 231,
"end": 247,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 238,
"end": 246,
"ctxt": 0
},
"value": "backup",
"raw": "\"backup\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 270,
"end": 295,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 282,
"end": 294,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 282,
"end": 289,
"ctxt": 0
},
"value": "console",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 289,
"end": 294,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 291,
"end": 294,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 302,
"end": 303,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 296,
"end": 631,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 310,
"end": 343,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 318,
"end": 326,
"ctxt": 0
},
"value": "myModule",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 329,
"end": 342,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 329,
"end": 335,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 336,
"end": 341,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 348,
"end": 629,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 348,
"end": 354,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 348,
"end": 629,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 357,
"end": 629,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 367,
"end": 399,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 373,
"end": 398,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 373,
"end": 382,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 385,
"end": 398,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 385,
"end": 391,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 392,
"end": 397,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 408,
"end": 623,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 408,
"end": 622,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 408,
"end": 426,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 408,
"end": 421,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 408,
"end": 412,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 413,
"end": 421,
"ctxt": 0
},
"value": "myModule",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 422,
"end": 426,
"ctxt": 0
},
"value": "then",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 427,
"end": 483,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 427,
"end": 431,
"ctxt": 0
},
"value": "Zero",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 435,
"end": 483,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 449,
"end": 473,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 449,
"end": 472,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 449,
"end": 460,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 449,
"end": 456,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 457,
"end": 460,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 461,
"end": 471,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 461,
"end": 469,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 461,
"end": 465,
"ctxt": 0
},
"value": "Zero",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 466,
"end": 469,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 485,
"end": 621,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 491,
"end": 494,
"ctxt": 0
},
"value": "err",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 498,
"end": 621,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 512,
"end": 529,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 512,
"end": 528,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 512,
"end": 523,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 512,
"end": 519,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 520,
"end": 523,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 524,
"end": 527,
"ctxt": 0
},
"value": "err",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 542,
"end": 572,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 546,
"end": 571,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 546,
"end": 549,
"ctxt": 0
},
"value": "one",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 552,
"end": 571,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 558,
"end": 571,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 558,
"end": 564,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 565,
"end": 570,
"ctxt": 0
},
"value": "./1",
"raw": "\"./1\""
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 585,
"end": 611,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 585,
"end": 610,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 585,
"end": 596,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 585,
"end": 592,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 593,
"end": 596,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 597,
"end": 609,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 597,
"end": 607,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 597,
"end": 600,
"ctxt": 0
},
"value": "one",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 601,
"end": 607,
"ctxt": 0
},
"value": "backup",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
],
"typeArguments": null
}
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExportDeclaration",
"span": {
"start": 633,
"end": 975,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 646,
"end": 647,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 640,
"end": 975,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 654,
"end": 687,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 662,
"end": 670,
"ctxt": 0
},
"value": "myModule",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 673,
"end": 686,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 673,
"end": 679,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 680,
"end": 685,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 692,
"end": 973,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 692,
"end": 698,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 692,
"end": 973,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 701,
"end": 973,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 711,
"end": 743,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 717,
"end": 742,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 717,
"end": 726,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 729,
"end": 742,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 729,
"end": 735,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 736,
"end": 741,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 752,
"end": 967,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 752,
"end": 966,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 752,
"end": 770,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 752,
"end": 765,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 752,
"end": 756,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 757,
"end": 765,
"ctxt": 0
},
"value": "myModule",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 766,
"end": 770,
"ctxt": 0
},
"value": "then",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 771,
"end": 827,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 771,
"end": 775,
"ctxt": 0
},
"value": "Zero",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 779,
"end": 827,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 793,
"end": 817,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 793,
"end": 816,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 793,
"end": 804,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 793,
"end": 800,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 801,
"end": 804,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 805,
"end": 815,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 805,
"end": 813,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 805,
"end": 809,
"ctxt": 0
},
"value": "Zero",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 810,
"end": 813,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 829,
"end": 965,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 835,
"end": 838,
"ctxt": 0
},
"value": "err",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 842,
"end": 965,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 856,
"end": 873,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 856,
"end": 872,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 856,
"end": 867,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 856,
"end": 863,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 864,
"end": 867,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 868,
"end": 871,
"ctxt": 0
},
"value": "err",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 886,
"end": 916,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 890,
"end": 915,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 890,
"end": 893,
"ctxt": 0
},
"value": "one",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 896,
"end": 915,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 902,
"end": 915,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 902,
"end": 908,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 909,
"end": 914,
"ctxt": 0
},
"value": "./1",
"raw": "\"./1\""
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 929,
"end": 955,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 929,
"end": 954,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 929,
"end": 940,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 929,
"end": 936,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 937,
"end": 940,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 941,
"end": 953,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 941,
"end": 951,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 941,
"end": 944,
"ctxt": 0
},
"value": "one",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 945,
"end": 951,
"ctxt": 0
},
"value": "backup",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
],
"typeArguments": null
}
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
],
"interpreter": null
}