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

1137 lines
36 KiB
JSON

{
"type": "Script",
"span": {
"start": 68,
"end": 1211,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 68,
"end": 111,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 82,
"end": 93,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"value": "x",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 82,
"end": 93,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 86,
"end": 93,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 98,
"end": 109,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "y",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 98,
"end": 109,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 102,
"end": 109,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"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": 119,
"end": 120,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 113,
"end": 1211,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 214,
"end": 533,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 220,
"end": 226,
"ctxt": 0
},
"value": "simple",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 214,
"end": 533,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 229,
"end": 533,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 276,
"end": 286,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 276,
"end": 285,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 276,
"end": 283,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 276,
"end": 281,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 332,
"end": 342,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 332,
"end": 341,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 332,
"end": 339,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 332,
"end": 337,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 338,
"end": 339,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 388,
"end": 401,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 388,
"end": 400,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 388,
"end": 398,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 388,
"end": 393,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 393,
"end": 398,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 394,
"end": 397,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 445,
"end": 463,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 451,
"end": 462,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 451,
"end": 452,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "SuperPropExpression",
"span": {
"start": 455,
"end": 462,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 455,
"end": 460,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 461,
"end": 462,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 506,
"end": 527,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 512,
"end": 526,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 512,
"end": 513,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "SuperPropExpression",
"span": {
"start": 516,
"end": 526,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 516,
"end": 521,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 521,
"end": 526,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 522,
"end": 525,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"definite": false
}
]
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 619,
"end": 1209,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 625,
"end": 633,
"ctxt": 0
},
"value": "advanced",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 619,
"end": 1209,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 636,
"end": 1209,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 646,
"end": 665,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 652,
"end": 664,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 652,
"end": 653,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 656,
"end": 664,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 662,
"end": 664,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 712,
"end": 722,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 712,
"end": 721,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 712,
"end": 719,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 712,
"end": 717,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 718,
"end": 719,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 768,
"end": 781,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 768,
"end": 780,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 768,
"end": 778,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 768,
"end": 773,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 773,
"end": 778,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 774,
"end": 777,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 825,
"end": 843,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 831,
"end": 842,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 831,
"end": 832,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "SuperPropExpression",
"span": {
"start": 835,
"end": 842,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 835,
"end": 840,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 841,
"end": 842,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 886,
"end": 907,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 892,
"end": 906,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 892,
"end": 893,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "SuperPropExpression",
"span": {
"start": 896,
"end": 906,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 896,
"end": 901,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 901,
"end": 906,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 902,
"end": 905,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 953,
"end": 965,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 953,
"end": 964,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "SuperPropExpression",
"span": {
"start": 953,
"end": 960,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 953,
"end": 958,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 959,
"end": 960,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 963,
"end": 964,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1010,
"end": 1025,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1010,
"end": 1024,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "SuperPropExpression",
"span": {
"start": 1010,
"end": 1020,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 1010,
"end": 1015,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 1015,
"end": 1020,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1016,
"end": 1019,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1023,
"end": 1024,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1088,
"end": 1113,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 1088,
"end": 1112,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1089,
"end": 1111,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 1089,
"end": 1103,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1091,
"end": 1092,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "SuperPropExpression",
"span": {
"start": 1094,
"end": 1101,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 1094,
"end": 1099,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1100,
"end": 1101,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 1106,
"end": 1111,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 1108,
"end": 1109,
"ctxt": 0
},
"value": "f",
"optional": false
}
]
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1175,
"end": 1203,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 1175,
"end": 1202,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1176,
"end": 1201,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 1176,
"end": 1193,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1178,
"end": 1179,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "SuperPropExpression",
"span": {
"start": 1181,
"end": 1191,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 1181,
"end": 1186,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 1186,
"end": 1191,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1187,
"end": 1190,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 1196,
"end": 1201,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 1198,
"end": 1199,
"ctxt": 0
},
"value": "f",
"optional": false
}
]
}
}
}
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "A",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}