 Issue 5417063522762752:
  Issue 427 - Desugar arrow functions to normal or bound functions  (Closed)
    
  
    Issue 5417063522762752:
  Issue 427 - Desugar arrow functions to normal or bound functions  (Closed) 
  | Index: scripts/astDecompile.js | 
| =================================================================== | 
| --- a/scripts/astDecompile.js | 
| +++ b/scripts/astDecompile.js | 
| @@ -244,16 +244,22 @@ function decompileObjectExpression(ast) | 
| } | 
| return "{\n" + props.join(",\n") + "}"; | 
| } | 
| function decompileFunctionExpression(ast) { | 
| return decompileFunctionDeclaration(ast); | 
| } | 
| +function decompileArrowExpression(ast) { | 
| + str = "(" + ast.params.map(decompileAST).join(",") + ")"; | 
| 
Wladimir Palant
2014/05/15 06:53:44
Declare this variable?
Also a nit: .join(", ") fo
 | 
| + str += " => " + decompileAST(ast.body); | 
| + return str; | 
| +} | 
| + | 
| function decompileSequenceExpression(ast) { | 
| return "(" + [decompileExpr(e, ast) for each (e in ast.expressions)].join(", ") + ")"; | 
| } | 
| function decompileUnaryExpression(ast) { | 
| if (ast.prefix) | 
| return ast.operator + " " + decompileExpr(ast.argument, ast); | 
| throw "ER, wtf?"; |