Expression clause = expressionChildOf(condParts.get(--pos));
Expression cond = (Expression) condParts.get(--pos);
FilePosition fpos = FilePosition.span(
cond.getFilePosition(), e.getFilePosition());
if (clause instanceof BooleanLiteral && e instanceof BooleanLiteral) {
BooleanLiteral a = (BooleanLiteral) clause,
b = (BooleanLiteral) e;
if (a.getValue() == b.getValue()) {
e = commaOp(cond, a).fold(false);
} else {
// cond ? true : false -> !!cond
int nNotsNeeded = a.getValue() ? 2 : 1;
if (nNotsNeeded == 2 && "boolean".equals(cond.typeOf())) {
nNotsNeeded = 0;
}
e = cond;
while (--nNotsNeeded >= 0) {