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

1006 lines
25 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 80,
"end": 512,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": true,
"span": {
"start": 80,
"end": 174,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 102,
"end": 116,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 109,
"end": 110,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 110,
"end": 115,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 112,
"end": 115,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 121,
"end": 140,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 121,
"end": 140,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 131,
"end": 139,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 133,
"end": 139,
"ctxt": 0
},
"kind": "number"
}
}
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassProperty",
"span": {
"start": 145,
"end": 155,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 146,
"end": 154,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 148,
"end": 154,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 160,
"end": 172,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 160,
"end": 172,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 163,
"end": 171,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 165,
"end": 171,
"ctxt": 0
},
"kind": "number"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 176,
"end": 512,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 200,
"end": 227,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 207,
"end": 208,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "TsNonNullExpression",
"span": {
"start": 216,
"end": 226,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 216,
"end": 225,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 208,
"end": 213,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 210,
"end": 213,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 232,
"end": 251,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 239,
"end": 241,
"ctxt": 0
},
"value": "y1",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 244,
"end": 250,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 244,
"end": 248,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 256,
"end": 277,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 263,
"end": 265,
"ctxt": 0
},
"value": "y2",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 268,
"end": 276,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 268,
"end": 274,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 268,
"end": 272,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 282,
"end": 304,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 289,
"end": 291,
"ctxt": 0
},
"value": "y3",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 294,
"end": 303,
"ctxt": 0
},
"callee": {
"type": "OptionalChainingExpression",
"span": {
"start": 294,
"end": 301,
"ctxt": 0
},
"questionDotToken": {
"start": 298,
"end": 299,
"ctxt": 0
},
"base": {
"type": "MemberExpression",
"span": {
"start": 294,
"end": 301,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 294,
"end": 298,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 300,
"end": 301,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 309,
"end": 335,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 316,
"end": 318,
"ctxt": 0
},
"value": "y4",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 321,
"end": 334,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 321,
"end": 332,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 321,
"end": 325,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 325,
"end": 332,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 326,
"end": 331,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 327,
"end": 330,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 340,
"end": 368,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 347,
"end": 349,
"ctxt": 0
},
"value": "y5",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 352,
"end": 367,
"ctxt": 0
},
"callee": {
"type": "OptionalChainingExpression",
"span": {
"start": 352,
"end": 365,
"ctxt": 0
},
"questionDotToken": {
"start": 356,
"end": 357,
"ctxt": 0
},
"base": {
"type": "MemberExpression",
"span": {
"start": 352,
"end": 365,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 352,
"end": 356,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 358,
"end": 365,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 359,
"end": 364,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 360,
"end": 363,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
}
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 373,
"end": 395,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 380,
"end": 382,
"ctxt": 0
},
"value": "z3",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 385,
"end": 394,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 385,
"end": 392,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 385,
"end": 390,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 391,
"end": 392,
"ctxt": 0
},
"value": "f",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 400,
"end": 425,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 407,
"end": 409,
"ctxt": 0
},
"value": "z4",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 412,
"end": 424,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 412,
"end": 422,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 412,
"end": 417,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 417,
"end": 422,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 418,
"end": 421,
"ctxt": 0
},
"value": "f",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 469,
"end": 475,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 469,
"end": 470,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 473,
"end": 474,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 480,
"end": 491,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 480,
"end": 481,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 484,
"end": 490,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 484,
"end": 488,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 489,
"end": 490,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 496,
"end": 510,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 496,
"end": 497,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 500,
"end": 509,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 500,
"end": 507,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 500,
"end": 505,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 506,
"end": 507,
"ctxt": 0
},
"value": "f",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}