unify visitors for if and loop statements