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

791 lines
21 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 51,
"end": 435,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 51,
"end": 90,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 67,
"end": 70,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 58,
"end": 90,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 73,
"end": 90,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 75,
"end": 88,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 82,
"end": 87,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 111,
"end": 125,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 111,
"end": 124,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 111,
"end": 117,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 118,
"end": 123,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 126,
"end": 149,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 130,
"end": 148,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 130,
"end": 132,
"ctxt": 0
},
"value": "p1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 135,
"end": 148,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 135,
"end": 141,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 142,
"end": 147,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 150,
"end": 194,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 150,
"end": 193,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 150,
"end": 157,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 150,
"end": 152,
"ctxt": 0
},
"value": "p1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 153,
"end": 157,
"ctxt": 0
},
"value": "then",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 158,
"end": 192,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 158,
"end": 162,
"ctxt": 0
},
"value": "zero",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 166,
"end": 192,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 172,
"end": 190,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 179,
"end": 189,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 179,
"end": 187,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 179,
"end": 183,
"ctxt": 0
},
"value": "zero",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 184,
"end": 187,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 196,
"end": 226,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 203,
"end": 226,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 207,
"end": 225,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 207,
"end": 209,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 212,
"end": 225,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 212,
"end": 218,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 219,
"end": 224,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 237,
"end": 240,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 228,
"end": 276,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 243,
"end": 276,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 249,
"end": 274,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 255,
"end": 273,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 255,
"end": 257,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 260,
"end": 273,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 260,
"end": 266,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 267,
"end": 272,
"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": 284,
"end": 285,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 278,
"end": 352,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 292,
"end": 350,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 292,
"end": 298,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 292,
"end": 350,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 301,
"end": 350,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 311,
"end": 344,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 317,
"end": 343,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 317,
"end": 326,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 329,
"end": 343,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 329,
"end": 335,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 337,
"end": 342,
"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": 354,
"end": 435,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 367,
"end": 368,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 361,
"end": 435,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 375,
"end": 433,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 375,
"end": 381,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 375,
"end": 433,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 384,
"end": 433,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 394,
"end": 427,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 400,
"end": 426,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 400,
"end": 409,
"ctxt": 0
},
"value": "loadAsync",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 412,
"end": 426,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 412,
"end": 418,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 420,
"end": 425,
"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
}