Add if translation support.

Do multiple passes to set the flags right and handle if statements.