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