swc/crates/swc_ecma_parser/tests/tsc/symbolProperty46.json

421 lines
10 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 221,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 16,
"end": 153,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 30,
"end": 83,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 34,
"end": 54,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 35,
"end": 53,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 35,
"end": 41,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 42,
"end": 53,
"ctxt": 0
},
"value": "hasInstance",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 30,
"end": 83,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 57,
"end": 83,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 67,
"end": 77,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 74,
"end": 76,
"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": 116,
"end": 151,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 120,
"end": 140,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 121,
"end": 139,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 121,
"end": 127,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 128,
"end": 139,
"ctxt": 0
},
"value": "hasInstance",
"optional": false
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 116,
"end": 151,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 144,
"end": 151,
"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": 155,
"end": 187,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 155,
"end": 186,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 155,
"end": 182,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 155,
"end": 162,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 156,
"end": 161,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": null,
"typeArguments": null
}
},
"property": {
"type": "Computed",
"span": {
"start": 162,
"end": 182,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 163,
"end": 181,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 163,
"end": 169,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 170,
"end": 181,
"ctxt": 0
},
"value": "hasInstance",
"optional": false
}
}
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 188,
"end": 221,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 188,
"end": 220,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 188,
"end": 215,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 188,
"end": 195,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 189,
"end": 194,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 193,
"end": 194,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": null,
"typeArguments": null
}
},
"property": {
"type": "Computed",
"span": {
"start": 195,
"end": 215,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 196,
"end": 214,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 196,
"end": 202,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 203,
"end": 214,
"ctxt": 0
},
"value": "hasInstance",
"optional": false
}
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 218,
"end": 220,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
}
],
"interpreter": null
}