swc/crates/swc_ecma_parser/tests/tsc/symbolProperty46.json
2022-04-05 12:46:35 +00:00

421 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 220,
"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": 152,
"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": 150,
"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": 141,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 115,
"end": 150,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 143,
"end": 150,
"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": 154,
"end": 186,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 154,
"end": 185,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 154,
"end": 181,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 154,
"end": 161,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 155,
"end": 160,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": null,
"typeArguments": null
}
},
"property": {
"type": "Computed",
"span": {
"start": 161,
"end": 181,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 162,
"end": 180,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 162,
"end": 168,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 169,
"end": 180,
"ctxt": 0
},
"value": "hasInstance",
"optional": false
}
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 184,
"end": 185,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 187,
"end": 220,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 187,
"end": 219,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 187,
"end": 214,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 187,
"end": 194,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 188,
"end": 193,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": null,
"typeArguments": null
}
},
"property": {
"type": "Computed",
"span": {
"start": 194,
"end": 214,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 195,
"end": 213,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 195,
"end": 201,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 202,
"end": 213,
"ctxt": 0
},
"value": "hasInstance",
"optional": false
}
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 217,
"end": 219,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
}
],
"interpreter": null
}