
Remove negation from the condition of if/while statements
remove_condition_negation.RdThe inverse of negate_condition(). Strips the leading ! from any
already-negated condition, so if (!done) becomes if (done) and
while (!ready) becomes while (ready).
Usage
remove_condition_negation(statements = c("if", "while"))Value
A Mutator object.
Details
Unlike remove_negation(), this mutator is scoped exclusively to
conditions, leaving negations in other positions (assignments, return
values, etc.) untouched.