swc/crates/swc_ecma_parser/tests/tsc/emitter.asyncGenerators.classMethods.es5.json
2022-04-05 12:46:35 +00:00

1229 lines
33 KiB
JSON

{
"type": "Script",
"span": {
"start": 52,
"end": 820,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"span": {
"start": 52,
"end": 88,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 67,
"end": 86,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 67,
"end": 86,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 79,
"end": 86,
"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": 115,
"end": 117,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 109,
"end": 170,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 124,
"end": 168,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 132,
"end": 133,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 124,
"end": 168,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 136,
"end": 168,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 146,
"end": 162,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 152,
"end": 161,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 156,
"end": 161,
"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": 197,
"end": 199,
"ctxt": 0
},
"value": "C3",
"optional": false
},
"declare": false,
"span": {
"start": 191,
"end": 254,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 206,
"end": 252,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 206,
"end": 252,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 218,
"end": 252,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 228,
"end": 246,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 234,
"end": 245,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 238,
"end": 245,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 244,
"end": 245,
"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": 281,
"end": 283,
"ctxt": 0
},
"value": "C4",
"optional": false
},
"declare": false,
"span": {
"start": 275,
"end": 341,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 290,
"end": 339,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 290,
"end": 339,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 302,
"end": 339,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 312,
"end": 333,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 318,
"end": 332,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 318,
"end": 319,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 322,
"end": 332,
"ctxt": 0
},
"argument": {
"type": "ArrayExpression",
"span": {
"start": 329,
"end": 332,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 330,
"end": 331,
"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": 368,
"end": 370,
"ctxt": 0
},
"value": "C5",
"optional": false
},
"declare": false,
"span": {
"start": 362,
"end": 459,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 377,
"end": 457,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 385,
"end": 386,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 377,
"end": 457,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 389,
"end": 457,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 399,
"end": 451,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 405,
"end": 450,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 405,
"end": 406,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 409,
"end": 450,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 416,
"end": 450,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 416,
"end": 448,
"ctxt": 0
},
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 417,
"end": 447,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 435,
"end": 447,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 437,
"end": 445,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 437,
"end": 444,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 443,
"end": 444,
"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": 486,
"end": 488,
"ctxt": 0
},
"value": "C6",
"optional": false
},
"declare": false,
"span": {
"start": 480,
"end": 543,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 495,
"end": 541,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 503,
"end": 504,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 495,
"end": 541,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 507,
"end": 541,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 517,
"end": 535,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 523,
"end": 534,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 523,
"end": 524,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 527,
"end": 534,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 533,
"end": 534,
"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": 570,
"end": 572,
"ctxt": 0
},
"value": "C7",
"optional": false
},
"declare": false,
"span": {
"start": 564,
"end": 618,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 579,
"end": 616,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 587,
"end": 588,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 579,
"end": 616,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 591,
"end": 616,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 601,
"end": 610,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 608,
"end": 609,
"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": 645,
"end": 647,
"ctxt": 0
},
"value": "C8",
"optional": false
},
"declare": false,
"span": {
"start": 639,
"end": 709,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 654,
"end": 665,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 654,
"end": 655,
"ctxt": 0
},
"value": "g",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 654,
"end": 665,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 658,
"end": 665,
"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": 670,
"end": 707,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 678,
"end": 679,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 670,
"end": 707,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 682,
"end": 707,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 692,
"end": 701,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 692,
"end": 700,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 692,
"end": 698,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 692,
"end": 696,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 697,
"end": 698,
"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": 736,
"end": 738,
"ctxt": 0
},
"value": "B9",
"optional": false
},
"declare": false,
"span": {
"start": 730,
"end": 753,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 745,
"end": 751,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 745,
"end": 746,
"ctxt": 0
},
"value": "g",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 745,
"end": 751,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 749,
"end": 751,
"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": 760,
"end": 762,
"ctxt": 0
},
"value": "C9",
"optional": false
},
"declare": false,
"span": {
"start": 754,
"end": 820,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 780,
"end": 818,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 788,
"end": 789,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 780,
"end": 818,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 792,
"end": 818,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 802,
"end": 812,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 802,
"end": 811,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 802,
"end": 809,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 802,
"end": 807,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 808,
"end": 809,
"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": 771,
"end": 773,
"ctxt": 0
},
"value": "B9",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}