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

791 lines
21 KiB
JSON

{
"type": "Module",
"span": {
"start": 67,
"end": 451,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 67,
"end": 106,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 83,
"end": 86,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 74,
"end": 106,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 89,
"end": 106,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 91,
"end": 104,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 98,
"end": 103,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 127,
"end": 141,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 127,
"end": 140,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 127,
"end": 133,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 134,
"end": 139,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 142,
"end": 165,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 146,
"end": 164,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 146,
"end": 148,
"ctxt": 0
},
"value": "p1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 151,
"end": 164,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 151,
"end": 157,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 158,
"end": 163,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 166,
"end": 210,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 166,
"end": 209,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 166,
"end": 173,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 166,
"end": 168,
"ctxt": 0
},
"value": "p1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 169,
"end": 173,
"ctxt": 0
},
"value": "then",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 174,
"end": 208,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 174,
"end": 178,
"ctxt": 0
},
"value": "zero",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 182,
"end": 208,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 188,
"end": 206,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 195,
"end": 205,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 195,
"end": 203,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 195,
"end": 199,
"ctxt": 0
},
"value": "zero",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 200,
"end": 203,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 212,
"end": 242,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 219,
"end": 242,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 223,
"end": 241,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 223,
"end": 225,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 228,
"end": 241,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 228,
"end": 234,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 235,
"end": 240,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 253,
"end": 256,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 244,
"end": 292,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 259,
"end": 292,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 265,
"end": 290,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 271,
"end": 289,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 271,
"end": 273,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 276,
"end": 289,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 276,
"end": 282,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 283,
"end": 288,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 300,
"end": 301,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 294,
"end": 368,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 308,
"end": 366,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 308,
"end": 314,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 308,
"end": 366,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 317,
"end": 366,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 327,
"end": 360,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 333,
"end": 359,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 333,
"end": 342,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 345,
"end": 359,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 345,
"end": 351,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 353,
"end": 358,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"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": 370,
"end": 451,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 383,
"end": 384,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 377,
"end": 451,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 391,
"end": 449,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 391,
"end": 397,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 391,
"end": 449,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 400,
"end": 449,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 410,
"end": 443,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 416,
"end": 442,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 416,
"end": 425,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 428,
"end": 442,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 428,
"end": 434,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 436,
"end": 441,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"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
}