diff options
Diffstat (limited to 'lexer.h')
-rw-r--r-- | lexer.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -44,6 +44,7 @@ static inline uint8_t get_ptok(char c, uint8_t dbg) { case '(' : return PTOK_LBRACK ; case ')' : return PTOK_RBRACK ; case ',' : return PTOK_COMMA ; + case 'B': case 'b' : return PTOK_B ; case 'X': case 'x' : return PTOK_X ; case 'Y': case 'y' : return PTOK_Y ; case 'S': case 's' : return PTOK_S ; @@ -64,3 +65,14 @@ static inline uint8_t get_ptok(char c, uint8_t dbg) { } } } + +static inline uint8_t is_altok(uint8_t ptok, uint8_t dbg) { + switch (ptok) { + case PTOK_B: + case PTOK_X: + case PTOK_Y: + case PTOK_S: + case PTOK_P: return 1; + default : return 0; + } +} |