ctx.replaceMe(condExpr.makeStmt());
} else if (thenExpr != null && elseExpr != null) {
// Convert "if (a()) {b()} else {c()}" => "a()?b():c()".
JsConditional cond = new JsConditional(x.getSourceInfo(),
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(x.getSourceInfo(),
JsBinaryOperator.OR, x.getIfExpr(), elseExpr);
ctx.replaceMe(accept(op.makeStmt()));