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

763 lines
20 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 55,
"end": 439,
"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
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 288,
"end": 289,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 282,
"end": 356,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 296,
"end": 354,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 296,
"end": 302,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 296,
"end": 354,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 305,
"end": 354,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 315,
"end": 348,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 321,
"end": 347,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 321,
"end": 330,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 333,
"end": 347,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 333,
"end": 339,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 341,
"end": 346,
"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": 358,
"end": 439,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 371,
"end": 372,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 365,
"end": 439,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 379,
"end": 437,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 379,
"end": 385,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 379,
"end": 437,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 388,
"end": 437,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 398,
"end": 431,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 404,
"end": 430,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 404,
"end": 413,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 416,
"end": 430,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 416,
"end": 422,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 424,
"end": 429,
"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
}