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

255 lines
6.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 28,
"end": 136,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 28,
"end": 65,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 42,
"end": 63,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"value": "m",
"optional": true
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 42,
"end": 63,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 56,
"end": 62,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 58,
"end": 62,
"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": 72,
"end": 73,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 66,
"end": 136,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 90,
"end": 134,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 90,
"end": 94,
"ctxt": 0
},
"value": "body",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 90,
"end": 134,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 97,
"end": 134,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 107,
"end": 128,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 107,
"end": 127,
"ctxt": 0
},
"operator": "&&",
"left": {
"type": "SuperPropExpression",
"span": {
"start": 107,
"end": 114,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 107,
"end": 112,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "m",
"optional": false
}
},
"right": {
"type": "CallExpression",
"span": {
"start": 118,
"end": 127,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 118,
"end": 125,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 118,
"end": 123,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 124,
"end": 125,
"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": 82,
"end": 83,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}