public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
130c623
)
Fix handling of labels in nested scopes
author
Mihai Bazon
<mihai@bazon.net>
Fri, 4 Jan 2013 12:17:33 +0000
(14:17 +0200)
committer
Mihai Bazon
<mihai@bazon.net>
Fri, 4 Jan 2013 12:17:33 +0000
(14:17 +0200)
lib/scope.js
patch
|
blob
|
history
diff --git
a/lib/scope.js
b/lib/scope.js
index
34ca5fb
..
7bcd372
100644
(file)
--- a/
lib/scope.js
+++ b/
lib/scope.js
@@
-84,9
+84,12
@@
AST_Toplevel.DEFMETHOD("figure_out_scope", function(){
if (node instanceof AST_Scope) {
node.init_scope_vars(nesting);
var save_scope = node.parent_scope = scope;
+ var save_labels = labels;
++nesting;
scope = node;
+ labels = new Dictionary();
descend();
+ labels = save_labels;
scope = save_scope;
--nesting;
return true; // don't descend again in TreeWalker