Fix incorrect lexing of "$ff00+c" (#882)

Fixes #881 by moving the task from the lexer to the parser.
This both alleviates the need for backtracking in the lexer,
removing what is (was) arguably a hack, and causes tokenization
boundaries to be properly respected, fixing the issue mentioned above.

Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com>
This commit is contained in:
Eldred Habert
2021-05-05 02:04:19 +02:00
committed by GitHub
parent c502804192
commit c06985a7ad
13 changed files with 31 additions and 28 deletions

5
test/asm/ff00+c.asm Normal file
View File

@@ -0,0 +1,5 @@
SECTION "test", ROM0[0]
ld [ $ff00 + c ], a
; 257 spaces exceeds both LEXER_BUF_SIZE (42) and uint8_t limit (255)
ld [ $ff00 + c ], a
ld [ $ff00 + c ], a