Transform code using visitor pattern.