mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
646 lines
15 KiB
JSON
646 lines
15 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 451,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 106,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 70,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"value": "B",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 64,
|
|
"end": 106,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassMethod",
|
|
"span": {
|
|
"start": 78,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 78,
|
|
"end": 83,
|
|
"ctxt": 0
|
|
},
|
|
"value": "print",
|
|
"optional": false
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 78,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 86,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 88,
|
|
"end": 103,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 103,
|
|
"ctxt": 0
|
|
},
|
|
"value": "I am B",
|
|
"raw": "\"I am B\""
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"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": 108,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 124,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 115,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 132,
|
|
"end": 144,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 139,
|
|
"end": 144,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"raw": "\"foo\""
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
},
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 167,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 183,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"value": "backup",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 174,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 194,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 201,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"value": "backup",
|
|
"raw": "\"backup\""
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 250,
|
|
"end": 253,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"declare": true,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 233,
|
|
"end": 265,
|
|
"ctxt": 0
|
|
},
|
|
"body": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 255,
|
|
"end": 264,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 257,
|
|
"end": 264,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 266,
|
|
"end": 308,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 272,
|
|
"end": 307,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 272,
|
|
"end": 279,
|
|
"ctxt": 0
|
|
},
|
|
"value": "specify",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "ConditionalExpression",
|
|
"span": {
|
|
"start": 282,
|
|
"end": 307,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 282,
|
|
"end": 287,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 282,
|
|
"end": 285,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"consequent": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 290,
|
|
"end": 295,
|
|
"ctxt": 0
|
|
},
|
|
"value": "./0",
|
|
"raw": "\"./0\""
|
|
},
|
|
"alternate": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 298,
|
|
"end": 307,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 309,
|
|
"end": 340,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 313,
|
|
"end": 339,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 313,
|
|
"end": 321,
|
|
"ctxt": 0
|
|
},
|
|
"value": "myModule",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 324,
|
|
"end": 339,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Import",
|
|
"span": {
|
|
"start": 324,
|
|
"end": 330,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 331,
|
|
"end": 338,
|
|
"ctxt": 0
|
|
},
|
|
"value": "specify",
|
|
"optional": false
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 341,
|
|
"end": 375,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 345,
|
|
"end": 374,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 345,
|
|
"end": 354,
|
|
"ctxt": 0
|
|
},
|
|
"value": "myModule1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 357,
|
|
"end": 374,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Import",
|
|
"span": {
|
|
"start": 357,
|
|
"end": 363,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 364,
|
|
"end": 373,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 376,
|
|
"end": 421,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 380,
|
|
"end": 420,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 380,
|
|
"end": 389,
|
|
"ctxt": 0
|
|
},
|
|
"value": "myModule2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 392,
|
|
"end": 420,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Import",
|
|
"span": {
|
|
"start": 392,
|
|
"end": 398,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "ConditionalExpression",
|
|
"span": {
|
|
"start": 399,
|
|
"end": 419,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 399,
|
|
"end": 404,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 399,
|
|
"end": 402,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"consequent": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 407,
|
|
"end": 412,
|
|
"ctxt": 0
|
|
},
|
|
"value": "./1",
|
|
"raw": "\"./1\""
|
|
},
|
|
"alternate": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 415,
|
|
"end": 419,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 422,
|
|
"end": 451,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 426,
|
|
"end": 450,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 426,
|
|
"end": 435,
|
|
"ctxt": 0
|
|
},
|
|
"value": "myModule3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 438,
|
|
"end": 450,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Import",
|
|
"span": {
|
|
"start": 438,
|
|
"end": 444,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 445,
|
|
"end": 449,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|