a LabeledStatement should be in fact a StatementWithBody
This fixes output for:
if (foo) {
moo: if (bar) {
break moo;
}
} else {
baz();
}
(the labeled statement must be outputted inside brackets)
This commit is contained in:
@@ -113,8 +113,8 @@ function Compressor(options, false_by_default) {
|
||||
|
||||
SQUEEZE(AST_LabeledStatement, function(self, compressor){
|
||||
self = self.clone();
|
||||
self.statement = self.statement.squeeze(compressor);
|
||||
return self.label.references.length == 0 ? self.statement : self;
|
||||
self.body = self.body.squeeze(compressor);
|
||||
return self.label.references.length == 0 ? self.body : self;
|
||||
});
|
||||
|
||||
SQUEEZE(AST_Statement, function(self, compressor){
|
||||
|
||||
Reference in New Issue
Block a user