From 8f182d5db075f4f4b939725065596f49bbd0d0d4 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sun, 4 Aug 2019 00:20:08 +1200 Subject: lex: empty file is equivalent to EOL lex() returning NULL is used to convey an error case but having not allocated any tokens in the case of an empty input file isn't an error case. This patch causes lex to treat an empty token stream after successfully examining a file as just a single EOL token. This is a fair approximation of an empty file for this assembler's purposes, and results in the correct behaviour of an empty output file. --- test/full-pipeline/010-empty.asm | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/full-pipeline/010-empty.asm (limited to 'test/full-pipeline') diff --git a/test/full-pipeline/010-empty.asm b/test/full-pipeline/010-empty.asm new file mode 100644 index 0000000..e69de29 -- cgit v1.1