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

763 lines
20 KiB
JSON

{
"type": "Module",
"span": {
"start": 54,
"end": 438,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 54,
"end": 93,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 70,
"end": 73,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 61,
"end": 93,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 76,
"end": 93,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 78,
"end": 91,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 85,
"end": 90,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 114,
"end": 128,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 114,
"end": 127,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 114,
"end": 120,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 121,
"end": 126,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 129,
"end": 152,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 133,
"end": 151,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 133,
"end": 135,
"ctxt": 0
},
"value": "p1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 138,
"end": 151,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 138,
"end": 144,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 145,
"end": 150,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 153,
"end": 197,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 153,
"end": 196,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 153,
"end": 160,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 153,
"end": 155,
"ctxt": 0
},
"value": "p1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 156,
"end": 160,
"ctxt": 0
},
"value": "then",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 161,
"end": 195,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 161,
"end": 165,
"ctxt": 0
},
"value": "zero",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 169,
"end": 195,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 175,
"end": 193,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 182,
"end": 192,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 182,
"end": 190,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 182,
"end": 186,
"ctxt": 0
},
"value": "zero",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 187,
"end": 190,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 199,
"end": 229,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 206,
"end": 229,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 210,
"end": 228,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 210,
"end": 212,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 215,
"end": 228,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 215,
"end": 221,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 222,
"end": 227,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 240,
"end": 243,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 231,
"end": 279,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 246,
"end": 279,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 252,
"end": 277,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 258,
"end": 276,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 258,
"end": 260,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 263,
"end": 276,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 263,
"end": 269,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 270,
"end": 275,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 287,
"end": 288,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 281,
"end": 355,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 295,
"end": 353,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 295,
"end": 301,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 295,
"end": 353,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 304,
"end": 353,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 314,
"end": 347,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 320,
"end": 346,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 320,
"end": 329,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 332,
"end": 346,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 332,
"end": 338,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 340,
"end": 345,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
]
},
"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": "ExportDeclaration",
"span": {
"start": 357,
"end": 438,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 370,
"end": 371,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 364,
"end": 438,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 378,
"end": 436,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 378,
"end": 384,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 378,
"end": 436,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 387,
"end": 436,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 397,
"end": 430,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 403,
"end": 429,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 403,
"end": 412,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 415,
"end": 429,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 415,
"end": 421,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 423,
"end": 428,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
]
},
"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": []
}
}
],
"interpreter": null
}