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

192 lines
4.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 19,
"end": 118,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 19,
"end": 29,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 36,
"end": 37,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 30,
"end": 118,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 54,
"end": 56,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"value": null,
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 62,
"end": 116,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 62,
"end": 73,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 76,
"end": 116,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 86,
"end": 93,
"ctxt": 0
},
"expression": {
"type": "UnaryExpression",
"span": {
"start": 86,
"end": 92,
"ctxt": 0
},
"operator": "void",
"argument": {
"type": "NumericLiteral",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"value": 0.0
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 102,
"end": 110,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 102,
"end": 109,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
"start": 102,
"end": 107,
"ctxt": 0
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}