swc/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclarationCapturesArguments_es5.json

234 lines
7.2 KiB
JSON

{
"type": "Script",
"span": {
"start": 68,
"end": 208,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 68,
"end": 208,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 81,
"end": 206,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 81,
"end": 206,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 90,
"end": 206,
"ctxt": 0
},
"stmts": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 107,
"end": 112,
"ctxt": 0
},
"value": "other",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 98,
"end": 117,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 115,
"end": 117,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 139,
"end": 141,
"ctxt": 0
},
"value": "fn",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 124,
"end": 201,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 145,
"end": 201,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 158,
"end": 193,
"ctxt": 0
},
"expression": {
"type": "AwaitExpression",
"span": {
"start": 158,
"end": 192,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 164,
"end": 192,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 164,
"end": 175,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 164,
"end": 169,
"ctxt": 0
},
"value": "other",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 170,
"end": 175,
"ctxt": 0
},
"value": "apply",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ThisExpression",
"span": {
"start": 176,
"end": 180,
"ctxt": 0
}
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 182,
"end": 191,
"ctxt": 0
},
"value": "arguments",
"optional": false
}
}
],
"typeArguments": null
}
}
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
}
]
},
"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": []
}
],
"interpreter": null
}