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

746 lines
21 KiB
JSON

{
"type": "Script",
"span": {
"start": 56,
"end": 584,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 56,
"end": 90,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 62,
"end": 90,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 62,
"end": 64,
"ctxt": 0
},
"value": "f1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 67,
"end": 90,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 87,
"end": 90,
"ctxt": 0
},
"stmts": []
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 111,
"end": 166,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 117,
"end": 166,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 117,
"end": 119,
"ctxt": 0
},
"value": "f2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 122,
"end": 166,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 142,
"end": 166,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 148,
"end": 164,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 154,
"end": 163,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 158,
"end": 163,
"ctxt": 0
},
"argument": null,
"delegate": false
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 187,
"end": 244,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 193,
"end": 244,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 193,
"end": 195,
"ctxt": 0
},
"value": "f3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 198,
"end": 244,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 218,
"end": 244,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 224,
"end": 242,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 230,
"end": 241,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 230,
"end": 231,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 234,
"end": 241,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 240,
"end": 241,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"delegate": false
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 265,
"end": 325,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 271,
"end": 325,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 271,
"end": 273,
"ctxt": 0
},
"value": "f4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 276,
"end": 325,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 296,
"end": 325,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 302,
"end": 323,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 308,
"end": 322,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 308,
"end": 309,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 312,
"end": 322,
"ctxt": 0
},
"argument": {
"type": "ArrayExpression",
"span": {
"start": 319,
"end": 322,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"delegate": true
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 346,
"end": 437,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 352,
"end": 437,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 352,
"end": 354,
"ctxt": 0
},
"value": "f5",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 357,
"end": 437,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 377,
"end": 437,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 383,
"end": 435,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 389,
"end": 434,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 389,
"end": 390,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "YieldExpression",
"span": {
"start": 393,
"end": 434,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 400,
"end": 434,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 400,
"end": 432,
"ctxt": 0
},
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 401,
"end": 431,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 419,
"end": 431,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 421,
"end": 429,
"ctxt": 0
},
"expression": {
"type": "YieldExpression",
"span": {
"start": 421,
"end": 428,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 427,
"end": 428,
"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
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 458,
"end": 515,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 464,
"end": 515,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 464,
"end": 466,
"ctxt": 0
},
"value": "f6",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 469,
"end": 515,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 489,
"end": 515,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 495,
"end": 513,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 501,
"end": 512,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 501,
"end": 502,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 505,
"end": 512,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 511,
"end": 512,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
"definite": false
}
]
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 536,
"end": 584,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 542,
"end": 584,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 542,
"end": 544,
"ctxt": 0
},
"value": "f7",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 547,
"end": 584,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 567,
"end": 584,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 573,
"end": 582,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 580,
"end": 581,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"generator": true,
"async": true,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
}
],
"interpreter": null
}