refactored assembler generation visitor