aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-09-21 14:19:05 +0300
committerMihai Bazon <mihai@bazon.net>2012-09-21 14:19:05 +0300
commit5491e1d7b11e363c79bdd352883e92fa3b711e69 (patch)
tree3963c0888af492f12adf0cc1adc6556be79cd858 /lib/scope.js
parentc4f8c2103fd77e3a6666034c2ca19a5ef09fe68b (diff)
downloadtracifyjs-5491e1d7b11e363c79bdd352883e92fa3b711e69.tar.gz
tracifyjs-5491e1d7b11e363c79bdd352883e92fa3b711e69.zip
better support for multiple input files:
- use a single AST_Toplevel node for all files - keep original source filename in the tokens
Diffstat (limited to 'lib/scope.js')
-rw-r--r--lib/scope.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/scope.js b/lib/scope.js
index 196af91c..d089b9da 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -188,6 +188,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(){
} else {
g = new SymbolDef(self, node);
g.undeclared = true;
+ globals[name] = g;
}
node.thedef = g;
if (name == "eval") {