swc/crates/swc_ecma_parser/tests/tsc/emitter.asyncGenerators.classMethods.es5.json

1224 lines
33 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 55,
"end": 879,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 61,
"end": 63,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"span": {
"start": 55,
"end": 94,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 71,
"end": 91,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 71,
"end": 91,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 83,
"end": 91,
"ctxt": 0
},
"stmts": []
},
"generator": true,
"async": true,
"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": 123,
"end": 125,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 117,
"end": 182,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 133,
"end": 179,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 133,
"end": 179,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 145,
"end": 179,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 156,
"end": 172,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 162,
"end": 171,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 162,
"end": 163,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 166,
"end": 171,
"ctxt": 0
},
"argument": null,
"delegate": false
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"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": 211,
"end": 213,
"ctxt": 0
},
"value": "C3",
"optional": false
},
"declare": false,
"span": {
"start": 205,
"end": 272,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 221,
"end": 269,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 229,
"end": 230,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 221,
"end": 269,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 233,
"end": 269,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 244,
"end": 262,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 250,
"end": 261,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 250,
"end": 251,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 254,
"end": 261,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 260,
"end": 261,
"ctxt": 0
},
"value": 1.0
},
"delegate": false
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"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": 301,
"end": 303,
"ctxt": 0
},
"value": "C4",
"optional": false
},
"declare": false,
"span": {
"start": 295,
"end": 365,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 311,
"end": 362,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 319,
"end": 320,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 311,
"end": 362,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 323,
"end": 362,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 334,
"end": 355,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 340,
"end": 354,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 340,
"end": 341,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 344,
"end": 354,
"ctxt": 0
},
"argument": {
"type": "ArrayExpression",
"span": {
"start": 351,
"end": 354,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 352,
"end": 353,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"delegate": true
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"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": 394,
"end": 396,
"ctxt": 0
},
"value": "C5",
"optional": false
},
"declare": false,
"span": {
"start": 388,
"end": 489,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 404,
"end": 486,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 412,
"end": 413,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 404,
"end": 486,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 416,
"end": 486,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 427,
"end": 479,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 433,
"end": 478,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 433,
"end": 434,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 437,
"end": 478,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 444,
"end": 478,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 444,
"end": 476,
"ctxt": 0
},
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 445,
"end": 475,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 463,
"end": 475,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 465,
"end": 473,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 465,
"end": 472,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 471,
"end": 472,
"ctxt": 0
},
"value": 1.0
},
"delegate": false
}
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
},
"delegate": true
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"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": 518,
"end": 520,
"ctxt": 0
},
"value": "C6",
"optional": false
},
"declare": false,
"span": {
"start": 512,
"end": 579,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 528,
"end": 576,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 536,
"end": 537,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 528,
"end": 576,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 540,
"end": 576,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 551,
"end": 569,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 557,
"end": 568,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 557,
"end": 558,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 561,
"end": 568,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 567,
"end": 568,
"ctxt": 0
},
"value": 1.0
}
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"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": 608,
"end": 610,
"ctxt": 0
},
"value": "C7",
"optional": false
},
"declare": false,
"span": {
"start": 602,
"end": 660,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 618,
"end": 657,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 626,
"end": 627,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 618,
"end": 657,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 630,
"end": 657,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 641,
"end": 650,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 648,
"end": 649,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": true,
"async": true,
"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": 689,
"end": 691,
"ctxt": 0
},
"value": "C8",
"optional": false
},
"declare": false,
"span": {
"start": 683,
"end": 759,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 699,
"end": 711,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 699,
"end": 700,
"ctxt": 0
},
"value": "g",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 699,
"end": 711,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 703,
"end": 711,
"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": 717,
"end": 756,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 725,
"end": 726,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 717,
"end": 756,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 729,
"end": 756,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 740,
"end": 749,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 740,
"end": 748,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 740,
"end": 746,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 740,
"end": 744,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 745,
"end": 746,
"ctxt": 0
},
"value": "g",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": true,
"async": true,
"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": 788,
"end": 790,
"ctxt": 0
},
"value": "B9",
"optional": false
},
"declare": false,
"span": {
"start": 782,
"end": 807,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 798,
"end": 804,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 798,
"end": 799,
"ctxt": 0
},
"value": "g",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 798,
"end": 804,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 802,
"end": 804,
"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": 815,
"end": 817,
"ctxt": 0
},
"value": "C9",
"optional": false
},
"declare": false,
"span": {
"start": 809,
"end": 879,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 836,
"end": 876,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 844,
"end": 845,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 836,
"end": 876,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 848,
"end": 876,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 859,
"end": 869,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 859,
"end": 868,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 859,
"end": 866,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 859,
"end": 864,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 865,
"end": 866,
"ctxt": 0
},
"value": "g",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 826,
"end": 828,
"ctxt": 0
},
"value": "B9",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}