mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
1688 lines
40 KiB
JSON
1688 lines
40 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 975,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 73,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"global": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 7,
|
|
"end": 8,
|
|
"ctxt": 0
|
|
},
|
|
"value": "M",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "TsModuleBlock",
|
|
"span": {
|
|
"start": 9,
|
|
"end": 73,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 33,
|
|
"ctxt": 0
|
|
},
|
|
"value": "fn",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 43,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 43,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 35,
|
|
"end": 43,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 37,
|
|
"end": 43,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 22,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 45,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 65,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 64,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 75,
|
|
"end": 86,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 85,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 80,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 85,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 82,
|
|
"end": 85,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "any"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 87,
|
|
"end": 438,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 96,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"cases": [
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 104,
|
|
"end": 112,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 109,
|
|
"end": 111,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 117,
|
|
"end": 125,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 122,
|
|
"end": 124,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 140,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 135,
|
|
"end": 139,
|
|
"ctxt": 0
|
|
},
|
|
"value": true
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 145,
|
|
"end": 155,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 150,
|
|
"end": 154,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 160,
|
|
"end": 175,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 165,
|
|
"end": 174,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 198,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 185,
|
|
"end": 197,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 189,
|
|
"end": 193,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Date",
|
|
"optional": false
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 194,
|
|
"end": 196,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 203,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 208,
|
|
"end": 220,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 212,
|
|
"end": 218,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Object",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 226,
|
|
"end": 239,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "RegExpLiteral",
|
|
"span": {
|
|
"start": 231,
|
|
"end": 238,
|
|
"ctxt": 0
|
|
},
|
|
"pattern": "[a-z]",
|
|
"flags": ""
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 244,
|
|
"end": 251,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 248,
|
|
"end": 250,
|
|
"ctxt": 0
|
|
},
|
|
"elements": []
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 256,
|
|
"end": 264,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 261,
|
|
"end": 263,
|
|
"ctxt": 0
|
|
},
|
|
"properties": []
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 269,
|
|
"end": 285,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 274,
|
|
"end": 284,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 276,
|
|
"end": 278,
|
|
"ctxt": 0
|
|
},
|
|
"value": "id",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 280,
|
|
"end": 282,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 290,
|
|
"end": 300,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 294,
|
|
"end": 299,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 295,
|
|
"end": 298,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 305,
|
|
"end": 319,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "UnaryExpression",
|
|
"span": {
|
|
"start": 310,
|
|
"end": 318,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "typeof",
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 317,
|
|
"end": 318,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 324,
|
|
"end": 338,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "UnaryExpression",
|
|
"span": {
|
|
"start": 329,
|
|
"end": 337,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "typeof",
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 336,
|
|
"end": 337,
|
|
"ctxt": 0
|
|
},
|
|
"value": "M",
|
|
"optional": false
|
|
}
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 343,
|
|
"end": 356,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 348,
|
|
"end": 355,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 348,
|
|
"end": 352,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 348,
|
|
"end": 349,
|
|
"ctxt": 0
|
|
},
|
|
"value": "M",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 350,
|
|
"end": 352,
|
|
"ctxt": 0
|
|
},
|
|
"value": "fn",
|
|
"optional": false
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 353,
|
|
"end": 354,
|
|
"ctxt": 0
|
|
},
|
|
"value": 1.0
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 387,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 366,
|
|
"end": 386,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 370,
|
|
"end": 379,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 371,
|
|
"end": 379,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 373,
|
|
"end": 379,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 384,
|
|
"end": 386,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 366,
|
|
"end": 369,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 367,
|
|
"end": 368,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 367,
|
|
"end": 368,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 392,
|
|
"end": 423,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 397,
|
|
"end": 422,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "ParenthesisExpression",
|
|
"span": {
|
|
"start": 397,
|
|
"end": 419,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 398,
|
|
"end": 418,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 402,
|
|
"end": 411,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 403,
|
|
"end": 411,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 405,
|
|
"end": 411,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 416,
|
|
"end": 418,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 398,
|
|
"end": 401,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 399,
|
|
"end": 400,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 399,
|
|
"end": 400,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 420,
|
|
"end": 421,
|
|
"ctxt": 0
|
|
},
|
|
"value": 2.0
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 428,
|
|
"end": 436,
|
|
"ctxt": 0
|
|
},
|
|
"test": null,
|
|
"consequent": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 526,
|
|
"end": 527,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 520,
|
|
"end": 543,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 530,
|
|
"end": 541,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 530,
|
|
"end": 532,
|
|
"ctxt": 0
|
|
},
|
|
"value": "id",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 532,
|
|
"end": 540,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 534,
|
|
"end": 540,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 550,
|
|
"end": 551,
|
|
"ctxt": 0
|
|
},
|
|
"value": "D",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 544,
|
|
"end": 578,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 564,
|
|
"end": 576,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 564,
|
|
"end": 568,
|
|
"ctxt": 0
|
|
},
|
|
"value": "name",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 568,
|
|
"end": 576,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 570,
|
|
"end": 576,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 560,
|
|
"end": 561,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 580,
|
|
"end": 667,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 588,
|
|
"end": 595,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 592,
|
|
"end": 593,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"cases": [
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 603,
|
|
"end": 616,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 608,
|
|
"end": 615,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 612,
|
|
"end": 613,
|
|
"ctxt": 0
|
|
},
|
|
"value": "D",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 621,
|
|
"end": 647,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 626,
|
|
"end": 646,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 628,
|
|
"end": 630,
|
|
"ctxt": 0
|
|
},
|
|
"value": "id",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 632,
|
|
"end": 634,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 636,
|
|
"end": 640,
|
|
"ctxt": 0
|
|
},
|
|
"value": "name",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 642,
|
|
"end": 644,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"consequent": []
|
|
},
|
|
{
|
|
"type": "SwitchCase",
|
|
"span": {
|
|
"start": 652,
|
|
"end": 665,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 657,
|
|
"end": 664,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 661,
|
|
"end": 662,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"consequent": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 669,
|
|
"end": 684,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 677,
|
|
"end": 679,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 685,
|
|
"end": 700,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 693,
|
|
"end": 695,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 701,
|
|
"end": 718,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 709,
|
|
"end": 713,
|
|
"ctxt": 0
|
|
},
|
|
"value": true
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 719,
|
|
"end": 736,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 727,
|
|
"end": 731,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 737,
|
|
"end": 759,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 745,
|
|
"end": 754,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 760,
|
|
"end": 785,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 768,
|
|
"end": 780,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 772,
|
|
"end": 776,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Date",
|
|
"optional": false
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 777,
|
|
"end": 779,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 786,
|
|
"end": 811,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 794,
|
|
"end": 806,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 798,
|
|
"end": 804,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Object",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 812,
|
|
"end": 832,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "RegExpLiteral",
|
|
"span": {
|
|
"start": 820,
|
|
"end": 827,
|
|
"ctxt": 0
|
|
},
|
|
"pattern": "[a-z]",
|
|
"flags": ""
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 833,
|
|
"end": 848,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 841,
|
|
"end": 843,
|
|
"ctxt": 0
|
|
},
|
|
"elements": []
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 849,
|
|
"end": 864,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 857,
|
|
"end": 859,
|
|
"ctxt": 0
|
|
},
|
|
"properties": []
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 865,
|
|
"end": 888,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 873,
|
|
"end": 883,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 875,
|
|
"end": 877,
|
|
"ctxt": 0
|
|
},
|
|
"value": "id",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 879,
|
|
"end": 881,
|
|
"ctxt": 0
|
|
},
|
|
"value": 12.0
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 889,
|
|
"end": 907,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "ArrayExpression",
|
|
"span": {
|
|
"start": 897,
|
|
"end": 902,
|
|
"ctxt": 0
|
|
},
|
|
"elements": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 898,
|
|
"end": 901,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 908,
|
|
"end": 941,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 916,
|
|
"end": 936,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 920,
|
|
"end": 929,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 921,
|
|
"end": 929,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 923,
|
|
"end": 929,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 934,
|
|
"end": 936,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 916,
|
|
"end": 919,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 917,
|
|
"end": 918,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 917,
|
|
"end": 918,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
},
|
|
"cases": []
|
|
},
|
|
{
|
|
"type": "SwitchStatement",
|
|
"span": {
|
|
"start": 942,
|
|
"end": 975,
|
|
"ctxt": 0
|
|
},
|
|
"discriminant": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 950,
|
|
"end": 970,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "ParenthesisExpression",
|
|
"span": {
|
|
"start": 950,
|
|
"end": 967,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 951,
|
|
"end": 966,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 955,
|
|
"end": 959,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 956,
|
|
"end": 959,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 958,
|
|
"end": 959,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 958,
|
|
"end": 959,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 964,
|
|
"end": 966,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"hasEscape": false,
|
|
"kind": {
|
|
"type": "normal",
|
|
"containsQuote": true
|
|
}
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 951,
|
|
"end": 954,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 952,
|
|
"end": 953,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 952,
|
|
"end": 953,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 968,
|
|
"end": 969,
|
|
"ctxt": 0
|
|
},
|
|
"value": 1.0
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"cases": []
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|