diff options
Diffstat (limited to 'lib/scope.js')
-rw-r--r-- | lib/scope.js | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/lib/scope.js b/lib/scope.js index 67ef267b..f705428e 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -113,28 +113,8 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(){ if (node instanceof AST_Label) { node.thedef = node; node.init_scope_vars(); - var p = tw.parent(); // AST_LabeledStatement - var block = p.body; - if (block instanceof AST_StatementWithBody) - block = block.body; - node.label_target = block; } - if (node instanceof AST_LoopControl) { - if (!node.label) { - var a = tw.stack, i = a.length - 1; - while (--i >= 0) { - var p = a[i]; - if (p instanceof AST_For - || p instanceof AST_ForIn - || p instanceof AST_DWLoop - || p instanceof AST_SwitchBranch) { - node.loopcontrol_target = p.body; - break; - } - } - } - } - else if (node instanceof AST_SymbolLambda) { + if (node instanceof AST_SymbolLambda) { scope.def_function(node); node.init.push(tw.parent()); } @@ -347,11 +327,6 @@ AST_Symbol.DEFMETHOD("global", function(){ return this.definition().global; }); -AST_LoopControl.DEFMETHOD("target", function(){ - if (this.label) return this.label.definition().label_target; - return this.loopcontrol_target; -}); - AST_Toplevel.DEFMETHOD("mangle_names", function(options){ options = defaults(options, { sort : false, |