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

1113 lines
35 KiB
JSON

{
"type": "Script",
"span": {
"start": 69,
"end": 1212,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 69,
"end": 112,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 83,
"end": 94,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "x",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 83,
"end": 94,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 87,
"end": 94,
"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": 99,
"end": 110,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": "y",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 99,
"end": 110,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 103,
"end": 110,
"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": 120,
"end": 121,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 114,
"end": 1212,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 215,
"end": 534,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 221,
"end": 227,
"ctxt": 0
},
"value": "simple",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 215,
"end": 534,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 230,
"end": 534,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 277,
"end": 287,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 277,
"end": 286,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 277,
"end": 284,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 277,
"end": 282,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 283,
"end": 284,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 333,
"end": 343,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 333,
"end": 342,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 333,
"end": 340,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 333,
"end": 338,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 339,
"end": 340,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 389,
"end": 402,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 389,
"end": 401,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 389,
"end": 399,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 389,
"end": 394,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 394,
"end": 399,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 395,
"end": 398,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 446,
"end": 464,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 452,
"end": 463,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 452,
"end": 453,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "SuperPropExpression",
"span": {
"start": 456,
"end": 463,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 456,
"end": 461,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 462,
"end": 463,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 507,
"end": 528,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 513,
"end": 527,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 513,
"end": 514,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "SuperPropExpression",
"span": {
"start": 517,
"end": 527,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 517,
"end": 522,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 522,
"end": 527,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 523,
"end": 526,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
},
"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": 620,
"end": 1210,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 626,
"end": 634,
"ctxt": 0
},
"value": "advanced",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 620,
"end": 1210,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 637,
"end": 1210,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 647,
"end": 666,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 653,
"end": 665,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 653,
"end": 654,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 657,
"end": 665,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 663,
"end": 665,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 713,
"end": 723,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 713,
"end": 722,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 713,
"end": 720,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 713,
"end": 718,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 719,
"end": 720,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 769,
"end": 782,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 769,
"end": 781,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 769,
"end": 779,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 769,
"end": 774,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 774,
"end": 779,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 775,
"end": 778,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 826,
"end": 844,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 832,
"end": 843,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 832,
"end": 833,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "SuperPropExpression",
"span": {
"start": 836,
"end": 843,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 836,
"end": 841,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 842,
"end": 843,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 887,
"end": 908,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 893,
"end": 907,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 893,
"end": 894,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "SuperPropExpression",
"span": {
"start": 897,
"end": 907,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 897,
"end": 902,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 902,
"end": 907,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 903,
"end": 906,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 954,
"end": 966,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 954,
"end": 965,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "SuperPropExpression",
"span": {
"start": 954,
"end": 961,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 954,
"end": 959,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 960,
"end": 961,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 964,
"end": 965,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1011,
"end": 1026,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1011,
"end": 1025,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "SuperPropExpression",
"span": {
"start": 1011,
"end": 1021,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 1011,
"end": 1016,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 1016,
"end": 1021,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1017,
"end": 1020,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1024,
"end": 1025,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1089,
"end": 1114,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 1089,
"end": 1113,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1090,
"end": 1112,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 1090,
"end": 1104,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1092,
"end": 1093,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "SuperPropExpression",
"span": {
"start": 1095,
"end": 1102,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 1095,
"end": 1100,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1101,
"end": 1102,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 1107,
"end": 1112,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 1109,
"end": 1110,
"ctxt": 0
},
"value": "f",
"optional": false
}
]
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1176,
"end": 1204,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 1176,
"end": 1203,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1177,
"end": 1202,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 1177,
"end": 1194,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1179,
"end": 1180,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "SuperPropExpression",
"span": {
"start": 1182,
"end": 1192,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 1182,
"end": 1187,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 1187,
"end": 1192,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1188,
"end": 1191,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
}
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 1197,
"end": 1202,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 1199,
"end": 1200,
"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": 130,
"end": 131,
"ctxt": 0
},
"value": "A",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}