mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
436 lines
11 KiB
JSON
436 lines
11 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 228,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 21,
|
|
"end": 22,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 15,
|
|
"end": 160,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassMethod",
|
|
"span": {
|
|
"start": 29,
|
|
"end": 82,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 33,
|
|
"end": 53,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"value": "hasInstance",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 29,
|
|
"end": 82,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 82,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 66,
|
|
"end": 76,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 75,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"kind": "getter",
|
|
"isStatic": false,
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false
|
|
},
|
|
{
|
|
"type": "ClassMethod",
|
|
"span": {
|
|
"start": 115,
|
|
"end": 158,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 139,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 120,
|
|
"end": 138,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 120,
|
|
"end": 126,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 127,
|
|
"end": 138,
|
|
"ctxt": 0
|
|
},
|
|
"value": "hasInstance",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
"function": {
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 149,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 149,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 141,
|
|
"end": 149,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 143,
|
|
"end": 149,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 115,
|
|
"end": 158,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 151,
|
|
"end": 158,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"kind": "setter",
|
|
"isStatic": false,
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 162,
|
|
"end": 194,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 162,
|
|
"end": 193,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 162,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "ParenthesisExpression",
|
|
"span": {
|
|
"start": 162,
|
|
"end": 169,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 163,
|
|
"end": 168,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 167,
|
|
"end": 168,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"arguments": null,
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 169,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 170,
|
|
"end": 188,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 170,
|
|
"end": 176,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 177,
|
|
"end": 188,
|
|
"ctxt": 0
|
|
},
|
|
"value": "hasInstance",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 193,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 228,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 227,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "ParenthesisExpression",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 202,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NewExpression",
|
|
"span": {
|
|
"start": 196,
|
|
"end": 201,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 200,
|
|
"end": 201,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"arguments": null,
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 202,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 203,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 203,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"value": "hasInstance",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 225,
|
|
"end": 227,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|