diff options
Diffstat (limited to 'lib/ast.js')
-rw-r--r-- | lib/ast.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -288,10 +288,13 @@ var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", { var label = node.label; var def = this.label; node.walk(new TreeWalker(function(node) { - if (node instanceof AST_LoopControl && node.label && node.label.thedef === def) { + if (node instanceof AST_LoopControl) { + if (!node.label || node.label.thedef !== def) return; node.label.thedef = label; label.references.push(node); + return true; } + if (node instanceof AST_Scope) return true; })); } return node; |