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

377 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 298,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 11,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 38,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 18,
"end": 36,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 18,
"end": 29,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 33,
"end": 36,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 39,
"end": 298,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 66,
"end": 77,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 74,
"end": 76,
"ctxt": 0
},
"value": "_t",
"optional": false
},
"value": null,
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 82,
"end": 296,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 82,
"end": 93,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 96,
"end": 296,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 106,
"end": 132,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 110,
"end": 131,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 114,
"end": 131,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 120,
"end": 131,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 122,
"end": 126,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 127,
"end": 129,
"ctxt": 0
},
"value": "_t",
"optional": false
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 141,
"end": 145,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "x",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 246,
"end": 254,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 246,
"end": 253,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 246,
"end": 250,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 251,
"end": 253,
"ctxt": 0
},
"value": "_t",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 273,
"end": 290,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 273,
"end": 289,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
"start": 273,
"end": 278,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 279,
"end": 288,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 55,
"end": 59,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}