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

1229 lines
33 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 53,
"end": 821,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 59,
"end": 61,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"span": {
"start": 53,
"end": 89,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 68,
"end": 87,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 68,
"end": 87,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 80,
"end": 87,
"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": 116,
"end": 118,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 110,
"end": 171,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 125,
"end": 169,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 133,
"end": 134,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 125,
"end": 169,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 137,
"end": 169,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 147,
"end": 163,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 153,
"end": 162,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 157,
"end": 162,
"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": 198,
"end": 200,
"ctxt": 0
},
"value": "C3",
"optional": false
},
"declare": false,
"span": {
"start": 192,
"end": 255,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 207,
"end": 253,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 207,
"end": 253,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 219,
"end": 253,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 229,
"end": 247,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 235,
"end": 246,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 239,
"end": 246,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 245,
"end": 246,
"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": 282,
"end": 284,
"ctxt": 0
},
"value": "C4",
"optional": false
},
"declare": false,
"span": {
"start": 276,
"end": 342,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 291,
"end": 340,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 299,
"end": 300,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 291,
"end": 340,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 303,
"end": 340,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 313,
"end": 334,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 319,
"end": 333,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 319,
"end": 320,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 323,
"end": 333,
"ctxt": 0
},
"argument": {
"type": "ArrayExpression",
"span": {
"start": 330,
"end": 333,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 331,
"end": 332,
"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": 369,
"end": 371,
"ctxt": 0
},
"value": "C5",
"optional": false
},
"declare": false,
"span": {
"start": 363,
"end": 460,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 378,
"end": 458,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 378,
"end": 458,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 390,
"end": 458,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 400,
"end": 452,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 406,
"end": 451,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 406,
"end": 407,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 410,
"end": 451,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 417,
"end": 451,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 417,
"end": 449,
"ctxt": 0
},
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 418,
"end": 448,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 436,
"end": 448,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 438,
"end": 446,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 438,
"end": 445,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 444,
"end": 445,
"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": 487,
"end": 489,
"ctxt": 0
},
"value": "C6",
"optional": false
},
"declare": false,
"span": {
"start": 481,
"end": 544,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 496,
"end": 542,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 504,
"end": 505,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 496,
"end": 542,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 508,
"end": 542,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 518,
"end": 536,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 524,
"end": 535,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 524,
"end": 525,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 528,
"end": 535,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 534,
"end": 535,
"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": 571,
"end": 573,
"ctxt": 0
},
"value": "C7",
"optional": false
},
"declare": false,
"span": {
"start": 565,
"end": 619,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 580,
"end": 617,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 588,
"end": 589,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 580,
"end": 617,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 592,
"end": 617,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 602,
"end": 611,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 609,
"end": 610,
"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": 646,
"end": 648,
"ctxt": 0
},
"value": "C8",
"optional": false
},
"declare": false,
"span": {
"start": 640,
"end": 710,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 655,
"end": 666,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 655,
"end": 656,
"ctxt": 0
},
"value": "g",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 655,
"end": 666,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 659,
"end": 666,
"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": 671,
"end": 708,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 679,
"end": 680,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 671,
"end": 708,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 683,
"end": 708,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 693,
"end": 702,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 693,
"end": 701,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 693,
"end": 699,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 693,
"end": 697,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 698,
"end": 699,
"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": 737,
"end": 739,
"ctxt": 0
},
"value": "B9",
"optional": false
},
"declare": false,
"span": {
"start": 731,
"end": 754,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 746,
"end": 752,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 746,
"end": 747,
"ctxt": 0
},
"value": "g",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 746,
"end": 752,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 750,
"end": 752,
"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": 761,
"end": 763,
"ctxt": 0
},
"value": "C9",
"optional": false
},
"declare": false,
"span": {
"start": 755,
"end": 821,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 781,
"end": 819,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 789,
"end": 790,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 781,
"end": 819,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 793,
"end": 819,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 803,
"end": 813,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 803,
"end": 812,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 803,
"end": 810,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 803,
"end": 808,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 809,
"end": 810,
"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": 772,
"end": 774,
"ctxt": 0
},
"value": "B9",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}