summaryrefslogtreecommitdiff
path: root/Token.h
diff options
context:
space:
mode:
Diffstat (limited to 'Token.h')
-rw-r--r--Token.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Token.h b/Token.h
index 1478199..1ff528a 100644
--- a/Token.h
+++ b/Token.h
@@ -3,7 +3,7 @@
enum {
TOK_NONE,
- TOK_KEYWORD,
+ TOK_WORD,
TOK_STRING,
TOK_INTEGER,
/* single char toks */
@@ -24,6 +24,10 @@ enum {
TOK_INCREMENT,
TOK_COMP_EQ,
TOK_COMP_NEQ,
+ /* keywords */
+ TOK_KW_VAR,
+ TOK_KW_CONST,
+ TOK_KW_FN,
};
union TokenValue {
@@ -37,8 +41,10 @@ union TokenValue {
typedef struct Token {
unsigned int type;
unsigned int line;
+ unsigned int column;
union TokenValue v;
} Token;
void token_free(Token *tok);
void token_print(const Token *tok);
+const char *token_type_str(const unsigned int type);