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

479 lines
12 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 55,
"end": 280,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 55,
"end": 94,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 71,
"end": 74,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 62,
"end": 94,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 77,
"end": 94,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 79,
"end": 92,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 86,
"end": 91,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 115,
"end": 129,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 115,
"end": 128,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 122,
"end": 127,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 130,
"end": 153,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 134,
"end": 152,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 134,
"end": 136,
"ctxt": 0
},
"value": "p1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 139,
"end": 152,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 139,
"end": 145,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 146,
"end": 151,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 154,
"end": 198,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 154,
"end": 197,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 154,
"end": 161,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 154,
"end": 156,
"ctxt": 0
},
"value": "p1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 157,
"end": 161,
"ctxt": 0
},
"value": "then",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 162,
"end": 196,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 162,
"end": 166,
"ctxt": 0
},
"value": "zero",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 170,
"end": 196,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 176,
"end": 194,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 183,
"end": 193,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 183,
"end": 191,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 183,
"end": 187,
"ctxt": 0
},
"value": "zero",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 188,
"end": 191,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 200,
"end": 230,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 207,
"end": 230,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 211,
"end": 229,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 211,
"end": 213,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 216,
"end": 229,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 216,
"end": 222,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 223,
"end": 228,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 241,
"end": 244,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 232,
"end": 280,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 247,
"end": 280,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 253,
"end": 278,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 259,
"end": 277,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 259,
"end": 261,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 264,
"end": 277,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 264,
"end": 270,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 271,
"end": 276,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}