swc/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments15.json
2022-03-22 07:54:08 +00:00

218 lines
5.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 156,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 17,
"end": 156,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 30,
"end": 156,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 36,
"end": 60,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 40,
"end": 59,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 40,
"end": 49,
"ctxt": 0
},
"value": "arguments",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 52,
"end": 59,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
},
"definite": false
}
]
},
{
"type": "IfStatement",
"span": {
"start": 65,
"end": 154,
"ctxt": 0
},
"test": {
"type": "CallExpression",
"span": {
"start": 69,
"end": 82,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 69,
"end": 80,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 69,
"end": 73,
"ctxt": 0
},
"value": "Math",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 74,
"end": 80,
"ctxt": 0
},
"value": "random",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 84,
"end": 154,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 94,
"end": 116,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 100,
"end": 115,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 100,
"end": 109,
"ctxt": 0
},
"value": "arguments",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 112,
"end": 115,
"ctxt": 0
},
"value": 100.0
},
"definite": false
}
]
},
{
"type": "ReturnStatement",
"span": {
"start": 125,
"end": 148,
"ctxt": 0
},
"argument": {
"type": "ArrowFunctionExpression",
"span": {
"start": 132,
"end": 147,
"ctxt": 0
},
"params": [],
"body": {
"type": "Identifier",
"span": {
"start": 138,
"end": 147,
"ctxt": 0
},
"value": "arguments",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
},
"alternate": null
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}