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

479 lines
12 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 58,
"end": 283,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 58,
"end": 97,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 74,
"end": 77,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 65,
"end": 97,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 80,
"end": 97,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 82,
"end": 95,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 89,
"end": 94,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 118,
"end": 132,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 118,
"end": 131,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 118,
"end": 124,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 125,
"end": 130,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 133,
"end": 156,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 137,
"end": 155,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 137,
"end": 139,
"ctxt": 0
},
"value": "p1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 142,
"end": 155,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 142,
"end": 148,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 149,
"end": 154,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 157,
"end": 201,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 157,
"end": 200,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 157,
"end": 164,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 157,
"end": 159,
"ctxt": 0
},
"value": "p1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 160,
"end": 164,
"ctxt": 0
},
"value": "then",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 165,
"end": 199,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 165,
"end": 169,
"ctxt": 0
},
"value": "zero",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 173,
"end": 199,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 179,
"end": 197,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 186,
"end": 196,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 186,
"end": 194,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 186,
"end": 190,
"ctxt": 0
},
"value": "zero",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 191,
"end": 194,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 203,
"end": 233,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 210,
"end": 233,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 214,
"end": 232,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 214,
"end": 216,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 219,
"end": 232,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 219,
"end": 225,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 226,
"end": 231,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 244,
"end": 247,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 235,
"end": 283,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 250,
"end": 283,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 256,
"end": 281,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 262,
"end": 280,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 262,
"end": 264,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 267,
"end": 280,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 267,
"end": 273,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 274,
"end": 279,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}