diff options
Diffstat (limited to 'include/lexer')
-rw-r--r-- | include/lexer/keywords.h | 4 | ||||
-rw-r--r-- | include/lexer/token.h | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/lexer/keywords.h b/include/lexer/keywords.h index 4919f73..23c5630 100644 --- a/include/lexer/keywords.h +++ b/include/lexer/keywords.h @@ -36,7 +36,9 @@ struct keyword { struct hashmap_entry hashmap_entry; size_t len; - enum token_kind value; + + enum token_kind tok_kind; + uint8_t tok_flags; }; struct keyword *keywords_find(struct token *tok); diff --git a/include/lexer/token.h b/include/lexer/token.h index e89da51..9400c01 100644 --- a/include/lexer/token.h +++ b/include/lexer/token.h @@ -38,11 +38,16 @@ enum token_kind { TK_EOF, TK_IDENTIFIER, - TK_VOID + TK_VOID, + TK_INT }; +#define TF_NONE 0 +#define TF_BUILTIN_TYPE (1 << 0) + struct token { enum token_kind kind; + uint8_t flags; const char *pos; int line; |