if (thenIsEmpty && elseIsEmpty) {
// Convert "if (a()) {}" => "a()".
ctx.replaceMe(condExpr.makeStmt());
} else if (thenExpr != null && elseExpr != null) {
// Convert "if (a()) {b()} else {c()}" => "a()?b():c()".
JsConditional cond = new JsConditional(makeSourceInfo(x,
"Replaced if statement with conditional"), x.getIfExpr(), thenExpr,
elseExpr);
ctx.replaceMe(accept(cond.makeStmt()));
} else if (thenIsEmpty && elseExpr != null) {
// Convert "if (a()) {} else {b()}" => a()||b().
JsBinaryOperation op = new JsBinaryOperation(makeSourceInfo(x,
"Replaced if statement with ||"), JsBinaryOperator.OR,
x.getIfExpr(), elseExpr);