conditionals : !false_by_default,
comparations : !false_by_default,
evaluate : !false_by_default,
+ booleans : !false_by_default,
warnings : true
});
}).optimize(compressor)
});
}
+ if (self.body instanceof AST_Exit
+ && self.alternative instanceof AST_Exit
+ && self.body.TYPE == self.alternative.TYPE) {
+ return make_node(self.body.CTOR, self, {
+ value: make_node(AST_Conditional, self, {
+ condition : self.condition,
+ consequent : self.body.value,
+ alternative : self.alternative.value
+ }).optimize(compressor)
+ });
+ }
return self;
});
return self;
});
+ SQUEEZE(AST_True, function(self, compressor){
+ if (compressor.option("booleans")) return make_node(AST_UnaryPrefix, self, {
+ operator: "!",
+ expression: make_node(AST_Number, self, {
+ value: 0
+ })
+ });
+ });
+
+ SQUEEZE(AST_False, function(self, compressor){
+ if (compressor.option("booleans")) return make_node(AST_UnaryPrefix, self, {
+ operator: "!",
+ expression: make_node(AST_Number, self, {
+ value: 1
+ })
+ });
+ });
+
})();