replace single-use recursive functions (#2659)

fixes #2628
This commit is contained in:
Alex Lam S.L
2017-12-26 21:25:35 +08:00
committed by GitHub
parent 7f342cb3e3
commit 4832bc5d88
5 changed files with 63 additions and 26 deletions

View File

@@ -307,7 +307,9 @@ AST_Scope.DEFMETHOD("find_variable", function(name){
});
AST_Scope.DEFMETHOD("def_function", function(symbol){
this.functions.set(symbol.name, this.def_variable(symbol));
var def = this.def_variable(symbol);
this.functions.set(symbol.name, def);
return def;
});
AST_Scope.DEFMETHOD("def_variable", function(symbol){