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

1229 lines
33 KiB
JSON

{
"type": "Script",
"span": {
"start": 56,
"end": 824,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 62,
"end": 64,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"span": {
"start": 56,
"end": 92,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 71,
"end": 90,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 71,
"end": 90,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 83,
"end": 90,
"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": 119,
"end": 121,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 113,
"end": 174,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 128,
"end": 172,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 128,
"end": 172,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 140,
"end": 172,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 150,
"end": 166,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 156,
"end": 165,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 160,
"end": 165,
"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": 201,
"end": 203,
"ctxt": 0
},
"value": "C3",
"optional": false
},
"declare": false,
"span": {
"start": 195,
"end": 258,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 210,
"end": 256,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 210,
"end": 256,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 222,
"end": 256,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 232,
"end": 250,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 238,
"end": 249,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 238,
"end": 239,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 242,
"end": 249,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 248,
"end": 249,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"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": 285,
"end": 287,
"ctxt": 0
},
"value": "C4",
"optional": false
},
"declare": false,
"span": {
"start": 279,
"end": 345,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 294,
"end": 343,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 302,
"end": 303,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 294,
"end": 343,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 306,
"end": 343,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 316,
"end": 337,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 322,
"end": 336,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 322,
"end": 323,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 326,
"end": 336,
"ctxt": 0
},
"argument": {
"type": "ArrayExpression",
"span": {
"start": 333,
"end": 336,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 334,
"end": 335,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"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": 372,
"end": 374,
"ctxt": 0
},
"value": "C5",
"optional": false
},
"declare": false,
"span": {
"start": 366,
"end": 463,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 381,
"end": 461,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 389,
"end": 390,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 381,
"end": 461,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 393,
"end": 461,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 403,
"end": 455,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 409,
"end": 454,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 409,
"end": 410,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 413,
"end": 454,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 420,
"end": 454,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 420,
"end": 452,
"ctxt": 0
},
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 421,
"end": 451,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 439,
"end": 451,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 441,
"end": 449,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 441,
"end": 448,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 447,
"end": 448,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"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": 490,
"end": 492,
"ctxt": 0
},
"value": "C6",
"optional": false
},
"declare": false,
"span": {
"start": 484,
"end": 547,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 499,
"end": 545,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 507,
"end": 508,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 499,
"end": 545,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 511,
"end": 545,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 521,
"end": 539,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 527,
"end": 538,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 527,
"end": 528,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 531,
"end": 538,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 537,
"end": 538,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
"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": 574,
"end": 576,
"ctxt": 0
},
"value": "C7",
"optional": false
},
"declare": false,
"span": {
"start": 568,
"end": 622,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 583,
"end": 620,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 591,
"end": 592,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 583,
"end": 620,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 595,
"end": 620,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 605,
"end": 614,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 612,
"end": 613,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"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": 649,
"end": 651,
"ctxt": 0
},
"value": "C8",
"optional": false
},
"declare": false,
"span": {
"start": 643,
"end": 713,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 658,
"end": 669,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 658,
"end": 659,
"ctxt": 0
},
"value": "g",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 658,
"end": 669,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 662,
"end": 669,
"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": 674,
"end": 711,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 682,
"end": 683,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 674,
"end": 711,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 686,
"end": 711,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 696,
"end": 705,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 696,
"end": 704,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 696,
"end": 702,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 696,
"end": 700,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 701,
"end": 702,
"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": 740,
"end": 742,
"ctxt": 0
},
"value": "B9",
"optional": false
},
"declare": false,
"span": {
"start": 734,
"end": 757,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 749,
"end": 755,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 749,
"end": 750,
"ctxt": 0
},
"value": "g",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 749,
"end": 755,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 753,
"end": 755,
"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": 764,
"end": 766,
"ctxt": 0
},
"value": "C9",
"optional": false
},
"declare": false,
"span": {
"start": 758,
"end": 824,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 784,
"end": 822,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 792,
"end": 793,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 784,
"end": 822,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 796,
"end": 822,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 806,
"end": 816,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 806,
"end": 815,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 806,
"end": 813,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 806,
"end": 811,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 812,
"end": 813,
"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": 775,
"end": 777,
"ctxt": 0
},
"value": "B9",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}