Fix handling of labels in nested scopes
This commit is contained in:
@@ -84,9 +84,12 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(){
|
|||||||
if (node instanceof AST_Scope) {
|
if (node instanceof AST_Scope) {
|
||||||
node.init_scope_vars(nesting);
|
node.init_scope_vars(nesting);
|
||||||
var save_scope = node.parent_scope = scope;
|
var save_scope = node.parent_scope = scope;
|
||||||
|
var save_labels = labels;
|
||||||
++nesting;
|
++nesting;
|
||||||
scope = node;
|
scope = node;
|
||||||
|
labels = new Dictionary();
|
||||||
descend();
|
descend();
|
||||||
|
labels = save_labels;
|
||||||
scope = save_scope;
|
scope = save_scope;
|
||||||
--nesting;
|
--nesting;
|
||||||
return true; // don't descend again in TreeWalker
|
return true; // don't descend again in TreeWalker
|
||||||
|
|||||||
Reference in New Issue
Block a user