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

587 lines
15 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
2022-02-04 14:17:42 +03:00
"start": 55,
"end": 520,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 72,
"end": 74,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 55,
"end": 80,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 77,
"end": 80,
"ctxt": 0
},
"stmts": []
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 118,
"end": 120,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 101,
"end": 147,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 123,
"end": 147,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 129,
"end": 145,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 135,
"end": 144,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 135,
"end": 136,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 139,
"end": 144,
"ctxt": 0
},
"argument": null,
"delegate": false
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 185,
"end": 187,
"ctxt": 0
},
"value": "f3",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 168,
"end": 216,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 190,
"end": 216,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 196,
"end": 214,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 202,
"end": 213,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 202,
"end": 203,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 206,
"end": 213,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 212,
"end": 213,
"ctxt": 0
},
"value": 1.0
},
"delegate": false
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 254,
"end": 256,
"ctxt": 0
},
"value": "f4",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 237,
"end": 288,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 259,
"end": 288,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 265,
"end": 286,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 271,
"end": 285,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 275,
"end": 285,
"ctxt": 0
},
"argument": {
"type": "ArrayExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 282,
"end": 285,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 283,
"end": 284,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"delegate": true
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 326,
"end": 328,
"ctxt": 0
},
"value": "f5",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 309,
"end": 391,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 331,
"end": 391,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 337,
"end": 389,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 343,
"end": 388,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 343,
"end": 344,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 347,
"end": 388,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 354,
"end": 388,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 354,
"end": 386,
"ctxt": 0
},
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 355,
"end": 385,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 373,
"end": 385,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 375,
"end": 383,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 375,
"end": 382,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 381,
"end": 382,
"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
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 429,
"end": 431,
"ctxt": 0
},
"value": "f6",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 412,
"end": 460,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 434,
"end": 460,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 440,
"end": 458,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 446,
"end": 457,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 446,
"end": 447,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 450,
"end": 457,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 456,
"end": 457,
"ctxt": 0
},
"value": 1.0
}
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 498,
"end": 500,
"ctxt": 0
},
"value": "f7",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 481,
"end": 520,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 503,
"end": 520,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 509,
"end": 518,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 516,
"end": 517,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}