we no longer have to handle labels on loops in block scoping

This commit is contained in:
Sebastian McKenzie
2015-01-30 21:26:35 +11:00
parent a5d8144cce
commit e514660fbd

View File

@@ -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 =