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

791 lines
21 KiB
JSON

{
"type": "Module",
"span": {
"start": 64,
"end": 448,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 64,
"end": 103,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 80,
"end": 83,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 71,
"end": 103,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 86,
"end": 103,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 88,
"end": 101,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 95,
"end": 100,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 124,
"end": 138,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 124,
"end": 137,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 124,
"end": 130,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 131,
"end": 136,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 139,
"end": 162,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 143,
"end": 161,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 143,
"end": 145,
"ctxt": 0
},
"value": "p1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 148,
"end": 161,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 148,
"end": 154,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 155,
"end": 160,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 163,
"end": 207,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 163,
"end": 206,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 163,
"end": 170,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 163,
"end": 165,
"ctxt": 0
},
"value": "p1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 166,
"end": 170,
"ctxt": 0
},
"value": "then",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 171,
"end": 205,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 171,
"end": 175,
"ctxt": 0
},
"value": "zero",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 179,
"end": 205,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 185,
"end": 203,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 192,
"end": 202,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 192,
"end": 200,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 192,
"end": 196,
"ctxt": 0
},
"value": "zero",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 197,
"end": 200,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 209,
"end": 239,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 216,
"end": 239,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 220,
"end": 238,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 220,
"end": 222,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 225,
"end": 238,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 225,
"end": 231,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 232,
"end": 237,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 250,
"end": 253,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 241,
"end": 289,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 256,
"end": 289,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 262,
"end": 287,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 268,
"end": 286,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 268,
"end": 270,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 273,
"end": 286,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 273,
"end": 279,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 280,
"end": 285,
"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": 297,
"end": 298,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 291,
"end": 365,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 305,
"end": 363,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 305,
"end": 311,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 305,
"end": 363,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 314,
"end": 363,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 324,
"end": 357,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 330,
"end": 356,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 330,
"end": 339,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 342,
"end": 356,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 342,
"end": 348,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 350,
"end": 355,
"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": 367,
"end": 448,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 380,
"end": 381,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 374,
"end": 448,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 388,
"end": 446,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 388,
"end": 394,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 388,
"end": 446,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 397,
"end": 446,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 407,
"end": 440,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 413,
"end": 439,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 413,
"end": 422,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 425,
"end": 439,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 425,
"end": 431,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 433,
"end": 438,
"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
}