Instead of just being in arguments for %IF and friends, how about allowing them in any expressions.
Is there some reason why (3 > 2) would not make sense in a numeric expression?
I think that all you need is to change the one line in parser.c that decides whether to parse these operators.