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

190 lines
4.2 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 20,
"end": 104,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 20,
"end": 30,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "EmptyStatement",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 32,
"end": 104,
"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": 60,
"end": 102,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 60,
"end": 71,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 74,
"end": 102,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 80,
"end": 85,
"ctxt": 0
},
"expression": {
"type": "ThisExpression",
"span": {
"start": 80,
"end": 84,
"ctxt": 0
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 90,
"end": 98,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 90,
"end": 97,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
"start": 90,
"end": 95,
"ctxt": 0
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}