swc/crates/swc_ecma_parser/tests/tsc/importCallExpression3ES2020.json
2022-03-22 07:54:08 +00:00

364 lines
9.2 KiB
JSON

{
"type": "Module",
"span": {
"start": 57,
"end": 241,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 57,
"end": 106,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 64,
"end": 106,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 78,
"end": 104,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 78,
"end": 83,
"ctxt": 0
},
"value": "print",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 78,
"end": 104,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 86,
"end": 104,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 88,
"end": 103,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 95,
"end": 103,
"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": 142,
"end": 145,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 127,
"end": 234,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 148,
"end": 234,
"ctxt": 0
},
"stmts": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 154,
"end": 196,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 170,
"end": 193,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 170,
"end": 191,
"ctxt": 0
},
"expression": {
"type": "AwaitExpression",
"span": {
"start": 171,
"end": 190,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 177,
"end": 190,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 177,
"end": 183,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 184,
"end": 189,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
}
}
},
"property": {
"type": "Identifier",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 201,
"end": 217,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 205,
"end": 216,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 205,
"end": 206,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 209,
"end": 216,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 213,
"end": 214,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 222,
"end": 232,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 222,
"end": 231,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 222,
"end": 229,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 224,
"end": 229,
"ctxt": 0
},
"value": "print",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 235,
"end": 241,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 235,
"end": 240,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 235,
"end": 238,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}