From e514660fbd1fa742aa8db3c3397e9d6c6a6b3426 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 30 Jan 2015 21:26:35 +1100 Subject: [PATCH] we no longer have to handle labels on loops in block scoping --- .../transformation/transformers/es6/block-scoping.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/6to5/transformation/transformers/es6/block-scoping.js b/lib/6to5/transformation/transformers/es6/block-scoping.js index a2d8144824..8c251c675f 100644 --- a/lib/6to5/transformation/transformers/es6/block-scoping.js +++ b/lib/6to5/transformation/transformers/es6/block-scoping.js @@ -46,19 +46,8 @@ exports.Loop = function (node, parent, scope, context, file) { t.ensureBlock(node); node.body._letDeclarators = [init]; } - - if (t.isLabeledStatement(parent)) { - // set label so `run` has access to it - node.label = parent.label; - } - var letScoping = new LetScoping(node, node.body, parent, scope, file); letScoping.run(); - - if (node.label && !t.isLabeledStatement(parent)) { - // we've been given a label so let's wrap ourselves - return t.labeledStatement(node.label, node); - } }; exports.Program =