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

364 lines
9.2 KiB
JSON

{
"type": "Module",
"span": {
"start": 58,
"end": 242,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 58,
"end": 107,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 71,
"end": 72,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 65,
"end": 107,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 79,
"end": 105,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 79,
"end": 84,
"ctxt": 0
},
"value": "print",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 79,
"end": 105,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 87,
"end": 105,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 89,
"end": 104,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 96,
"end": 104,
"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": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 143,
"end": 146,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 128,
"end": 235,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 149,
"end": 235,
"ctxt": 0
},
"stmts": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 161,
"end": 162,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 155,
"end": 197,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 171,
"end": 194,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 171,
"end": 192,
"ctxt": 0
},
"expression": {
"type": "AwaitExpression",
"span": {
"start": 172,
"end": 191,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 178,
"end": 191,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 178,
"end": 184,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 185,
"end": 190,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
}
}
},
"property": {
"type": "Identifier",
"span": {
"start": 193,
"end": 194,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 202,
"end": 218,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 206,
"end": 217,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 206,
"end": 207,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 210,
"end": 217,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 223,
"end": 233,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 223,
"end": 232,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 223,
"end": 230,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 223,
"end": 224,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 225,
"end": 230,
"ctxt": 0
},
"value": "print",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 236,
"end": 242,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 236,
"end": 241,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 236,
"end": 239,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}