aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scope.js')
-rw-r--r--lib/scope.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/scope.js b/lib/scope.js
index bbfa037c..bceec289 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -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){