diff options
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 ; |