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) { |
+ let str = "(" + ast.params.map(decompileAST).join(", ") + ")"; |
+ 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?"; |