swc/crates/swc_ecma_parser/tests/tsc/emitter.asyncGenerators.objectLiteralMethods.es2018.json

874 lines
26 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 58,
"end": 677,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 58,
"end": 99,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 64,
"end": 99,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 64,
"end": 66,
"ctxt": 0
},
"value": "o1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 69,
"end": 99,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 76,
"end": 96,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 88,
"end": 96,
"ctxt": 0
},
"stmts": []
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 122,
"end": 189,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 128,
"end": 189,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 128,
"end": 130,
"ctxt": 0
},
"value": "o2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 133,
"end": 189,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 140,
"end": 186,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 152,
"end": 186,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 163,
"end": 179,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 169,
"end": 178,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 169,
"end": 170,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 173,
"end": 178,
"ctxt": 0
},
"argument": null,
"delegate": false
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 212,
"end": 281,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 218,
"end": 281,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 218,
"end": 220,
"ctxt": 0
},
"value": "o3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 223,
"end": 281,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 238,
"end": 239,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 230,
"end": 278,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 242,
"end": 278,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 253,
"end": 271,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 259,
"end": 270,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 259,
"end": 260,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 263,
"end": 270,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 269,
"end": 270,
"ctxt": 0
},
"value": 1.0
},
"delegate": false
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 304,
"end": 376,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 310,
"end": 376,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 310,
"end": 312,
"ctxt": 0
},
"value": "o4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 315,
"end": 376,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 330,
"end": 331,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 322,
"end": 373,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 334,
"end": 373,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 345,
"end": 366,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 351,
"end": 365,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 351,
"end": 352,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 355,
"end": 365,
"ctxt": 0
},
"argument": {
"type": "ArrayExpression",
"span": {
"start": 362,
"end": 365,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 363,
"end": 364,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"delegate": true
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 399,
"end": 502,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 405,
"end": 502,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 405,
"end": 407,
"ctxt": 0
},
"value": "o5",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 410,
"end": 502,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 425,
"end": 426,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 417,
"end": 499,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 429,
"end": 499,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 440,
"end": 492,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 446,
"end": 491,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 446,
"end": 447,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 450,
"end": 491,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 457,
"end": 491,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 457,
"end": 489,
"ctxt": 0
},
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 458,
"end": 488,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 476,
"end": 488,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 478,
"end": 486,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 478,
"end": 485,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 484,
"end": 485,
"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
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 525,
"end": 594,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 531,
"end": 594,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 531,
"end": 533,
"ctxt": 0
},
"value": "o6",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 536,
"end": 594,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 551,
"end": 552,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 543,
"end": 591,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 555,
"end": 591,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 566,
"end": 584,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 572,
"end": 583,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 572,
"end": 573,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 576,
"end": 583,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 582,
"end": 583,
"ctxt": 0
},
"value": 1.0
}
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 617,
"end": 677,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 623,
"end": 677,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 623,
"end": 625,
"ctxt": 0
},
"value": "o7",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 628,
"end": 677,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 643,
"end": 644,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 635,
"end": 674,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 647,
"end": 674,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 658,
"end": 667,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 665,
"end": 666,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}