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

364 lines
9.2 KiB
JSON

{
"type": "Module",
"span": {
"start": 55,
"end": 239,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 55,
"end": 104,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 62,
"end": 104,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 76,
"end": 102,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 76,
"end": 81,
"ctxt": 0
},
"value": "print",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 76,
"end": 102,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 84,
"end": 102,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 86,
"end": 101,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 93,
"end": 101,
"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": 140,
"end": 143,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 125,
"end": 232,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 146,
"end": 232,
"ctxt": 0
},
"stmts": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 152,
"end": 194,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 168,
"end": 191,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 168,
"end": 189,
"ctxt": 0
},
"expression": {
"type": "AwaitExpression",
"span": {
"start": 169,
"end": 188,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 175,
"end": 188,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 175,
"end": 181,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 182,
"end": 187,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
}
}
},
"property": {
"type": "Identifier",
"span": {
"start": 190,
"end": 191,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 199,
"end": 215,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 203,
"end": 214,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 207,
"end": 214,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 211,
"end": 212,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 220,
"end": 230,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 220,
"end": 229,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 220,
"end": 227,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 222,
"end": 227,
"ctxt": 0
},
"value": "print",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 233,
"end": 239,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 233,
"end": 238,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 233,
"end": 236,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}