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

255 lines
6.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 27,
"end": 135,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 33,
"end": 34,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 27,
"end": 64,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 41,
"end": 62,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"value": "m",
"optional": true
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 41,
"end": 62,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 57,
"end": 61,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": "protected",
"isAbstract": false,
"isOptional": true,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 71,
"end": 72,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 65,
"end": 135,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 89,
"end": 133,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 89,
"end": 93,
"ctxt": 0
},
"value": "body",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 89,
"end": 133,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 96,
"end": 133,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 106,
"end": 127,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 106,
"end": 126,
"ctxt": 0
},
"operator": "&&",
"left": {
"type": "SuperPropExpression",
"span": {
"start": 106,
"end": 113,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 106,
"end": 111,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 112,
"end": 113,
"ctxt": 0
},
"value": "m",
"optional": false
}
},
"right": {
"type": "CallExpression",
"span": {
"start": 117,
"end": 126,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 117,
"end": 124,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 117,
"end": 122,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 123,
"end": 124,
"ctxt": 0
},
"value": "m",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 81,
"end": 82,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}