diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2020-06-01 15:15:17 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2020-06-01 15:15:17 -0400 |
commit | df81112b8369eeca5788a6f28c6b6b85ca911a95 (patch) | |
tree | fed73a1fb94485d4bc9dd25966d626c9338ccb05 /lexer.h | |
parent | f600bf84c453649f625b06ba232a7464e7093b32 (diff) |
Did some more refactoring to the assembler.
- Refactored the symbol, and fixup table to now use a
linked list
- Added support for local symbols to the assembler.
- Rewrote SuBEditor, and SuBAsm to use local symbols.
Diffstat (limited to 'lexer.h')
-rw-r--r-- | lexer.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -11,9 +11,30 @@ static inline uint8_t isdelm(char c, uint8_t dbg) { } } +static inline uint8_t isdelm2(char c, uint8_t dbg) { + switch (c) { + default : return 0; + case ')' : + case ',' : + case '.' : + case '+' : + case '<' : + case '>' : + case '-' : + case ':' : + case '=' : + case ';' : + case '\0': + case '\n': return 1; + case '\t': + case ' ' : return 2; + } +} + static inline uint8_t get_ptok(char c, uint8_t dbg) { switch (c) { case '.' : return PTOK_DOT ; + case '@' : return PTOK_AT ; case ':' : return PTOK_COLON ; case '=' : return PTOK_EQU ; case '+' : return PTOK_PLUS ; |