Generators can't use the visitor pattern.