ast = ast.transform(comp);
ast.figure_out_scope();
ast.mangle_names();
- var fun = ast.body[0].body.expression;
+ var fun;
+ try {
+ ast.walk(new TreeWalker(function(node){
+ if (node instanceof AST_Lambda) {
+ fun = node;
+ throw ast;
+ }
+ }));
+ } catch(ex) {
+ if (ex !== ast) throw ex;
+ };
var args = fun.argnames.map(function(arg, i){
return make_node(AST_String, self.args[i], {
value: arg.print_to_string()
compressor.warn(ex.toString());
} else {
console.log(ex);
+ throw ex;
}
}
}