mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
969 lines
20 KiB
JSON
969 lines
20 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 283,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsEnumDeclaration",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 19,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"isConst": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 6,
|
|
"end": 7,
|
|
"ctxt": 0
|
|
},
|
|
"value": "E",
|
|
"optional": false
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsEnumMember",
|
|
"span": {
|
|
"start": 10,
|
|
"end": 11,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 10,
|
|
"end": 11,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"init": null
|
|
},
|
|
{
|
|
"type": "TsEnumMember",
|
|
"span": {
|
|
"start": 13,
|
|
"end": 14,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 13,
|
|
"end": 14,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
},
|
|
"init": null
|
|
},
|
|
{
|
|
"type": "TsEnumMember",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 17,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 17,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
},
|
|
"init": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 21,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 31,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 26,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 26,
|
|
"end": 31,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 28,
|
|
"end": 31,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "any"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 33,
|
|
"end": 47,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 37,
|
|
"end": 46,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 37,
|
|
"end": 38,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 38,
|
|
"end": 46,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 40,
|
|
"end": 46,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 48,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 52,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 52,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 53,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"value": "E",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 59,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 63,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 63,
|
|
"end": 65,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x1",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 65,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 67,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "any"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 72,
|
|
"end": 81,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 72,
|
|
"end": 80,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 72,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 80,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 82,
|
|
"end": 91,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 82,
|
|
"end": 90,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 82,
|
|
"end": 84,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 89,
|
|
"end": 90,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 100,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 94,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 99,
|
|
"end": 100,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 114,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 113,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 109,
|
|
"end": 113,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 115,
|
|
"end": 132,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 115,
|
|
"end": 131,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 115,
|
|
"end": 117,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 122,
|
|
"end": 131,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 134,
|
|
"end": 149,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 138,
|
|
"end": 148,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 138,
|
|
"end": 140,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x2",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 148,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 142,
|
|
"end": 148,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 150,
|
|
"end": 159,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 150,
|
|
"end": 158,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 150,
|
|
"end": 152,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 157,
|
|
"end": 158,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 160,
|
|
"end": 169,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 160,
|
|
"end": 168,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 160,
|
|
"end": 162,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 167,
|
|
"end": 168,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 170,
|
|
"end": 179,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 170,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 170,
|
|
"end": 172,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 177,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 192,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 191,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 182,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 187,
|
|
"end": 191,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 193,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 193,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 193,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 200,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 212,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 216,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 216,
|
|
"end": 218,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x3",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 218,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 220,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 220,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"value": "E",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 232,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 231,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 225,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 230,
|
|
"end": 231,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 233,
|
|
"end": 242,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 233,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 233,
|
|
"end": 235,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 240,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 243,
|
|
"end": 252,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 243,
|
|
"end": 251,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 243,
|
|
"end": 245,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 250,
|
|
"end": 251,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 253,
|
|
"end": 265,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 253,
|
|
"end": 264,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 253,
|
|
"end": 255,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 260,
|
|
"end": 264,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 266,
|
|
"end": 283,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 266,
|
|
"end": 282,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "**=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 266,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 273,
|
|
"end": 282,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|