@@ -9174,17 +9174,20 @@ Compressor.prototype.compress = function(node) {
|
||||
child = parent;
|
||||
parent = compressor.parent(level++);
|
||||
if (parent instanceof AST_Binary) {
|
||||
var op = parent.operator;
|
||||
if (!lazy_op[op]) return;
|
||||
var left = parent.left;
|
||||
if (left === child) continue;
|
||||
if (match(left)) switch (op) {
|
||||
case "&&":
|
||||
node[negated ? "falsy" : "truthy"] = true;
|
||||
switch (child) {
|
||||
case parent.left:
|
||||
if (lazy_op[parent.operator]) continue;
|
||||
break;
|
||||
case "||":
|
||||
case "??":
|
||||
node[negated ? "truthy" : "falsy"] = true;
|
||||
case parent.right:
|
||||
if (match(parent.left)) switch (parent.operator) {
|
||||
case "&&":
|
||||
node[negated ? "falsy" : "truthy"] = true;
|
||||
break;
|
||||
case "||":
|
||||
case "??":
|
||||
node[negated ? "truthy" : "falsy"] = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (parent instanceof AST_Conditional) {
|
||||
|
||||
Reference in New Issue
Block a user