diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-09-03 12:05:10 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-09-03 12:05:10 +0300 |
commit | d7c1dc6c0578b55eefc3bc94556146dce6e1a8cb (patch) | |
tree | f5293d83b48fcd91e8924b4a3334f79ab4ba6163 /lib/compress.js | |
parent | d6efa8b28dc0a937bc154bf5f2e5d5450be5c1d5 (diff) | |
download | tracifyjs-d7c1dc6c0578b55eefc3bc94556146dce6e1a8cb.tar.gz tracifyjs-d7c1dc6c0578b55eefc3bc94556146dce6e1a8cb.zip |
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)
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js index 5dbe60b0..04d5720b 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -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){ |