Factored out the Rascal 'visit' translation code.