diff options
author | David Phillips <david@sighup.nz> | 2019-08-04 00:20:08 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2019-08-04 12:01:13 +1200 |
commit | 8f182d5db075f4f4b939725065596f49bbd0d0d4 (patch) | |
tree | d140dfb27b57743ee860d74aff8fa76a46328899 /test/Makefile | |
parent | 9aa02bebf295ce9436451e0ce85db7717a6c9f81 (diff) | |
download | toy-cpu-assembler-8f182d5db075f4f4b939725065596f49bbd0d0d4.tar.xz |
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.
Diffstat (limited to 'test/Makefile')
0 files changed, 0 insertions, 0 deletions