summaryrefslogtreecommitdiff
path: root/lexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.h')
-rw-r--r--lexer.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lexer.h b/lexer.h
index 952d525..225a5e5 100644
--- a/lexer.h
+++ b/lexer.h
@@ -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;
+ }
+}