swc/crates/swc_ecma_parser/tests/tsc/importCallExpressionInUMD3.json
2022-02-04 17:08:38 +09:00

372 lines
9.5 KiB
JSON

{
"type": "Module",
"span": {
"start": 54,
"end": 238,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 54,
"end": 103,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 61,
"end": 103,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 75,
"end": 101,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 75,
"end": 80,
"ctxt": 0
},
"value": "print",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 75,
"end": 101,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 83,
"end": 101,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 85,
"end": 100,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 92,
"end": 100,
"ctxt": 0
},
"value": "I am B",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"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": 139,
"end": 142,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 124,
"end": 231,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 145,
"end": 231,
"ctxt": 0
},
"stmts": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 151,
"end": 193,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 167,
"end": 190,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 167,
"end": 188,
"ctxt": 0
},
"expression": {
"type": "AwaitExpression",
"span": {
"start": 168,
"end": 187,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 174,
"end": 187,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 174,
"end": 180,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 181,
"end": 186,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
}
},
"property": {
"type": "Identifier",
"span": {
"start": 189,
"end": 190,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 198,
"end": 214,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 202,
"end": 213,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 206,
"end": 213,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 219,
"end": 229,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 219,
"end": 228,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 219,
"end": 226,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 221,
"end": 226,
"ctxt": 0
},
"value": "print",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 232,
"end": 238,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 232,
"end": 237,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 232,
"end": 235,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}