Add trailing newline detection to assembler