diff options
author | Himbeer <himbeer@disroot.org> | 2025-05-06 11:52:56 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2025-05-06 11:52:56 +0200 |
commit | 1d19bd1c66f8aa68848404a4b724dc3ca795b0da (patch) | |
tree | b62b825447228da651ec4ec2e18c68cf0155d907 | |
parent | 53b555eeb5939436a97b36436f28ce0a12549f9c (diff) |
Add align, enum and pub keywords
-rw-r--r-- | include/lex.h | 3 | ||||
-rw-r--r-- | src/lex.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/lex.h b/include/lex.h index a339878..2297be8 100644 --- a/include/lex.h +++ b/include/lex.h @@ -8,11 +8,13 @@ enum lexical_token { // Keywords + T_ALIGN, T_BREAK, T_CONST, T_CONTINUE, T_DEFER, T_ELSE, + T_ENUM, T_EXTERN, T_FALSE, T_FOR, @@ -20,6 +22,7 @@ enum lexical_token { T_IF, T_INCLUDE, T_LET, + T_PUB, T_RETURN, T_STRUCT, T_TRUE, @@ -10,11 +10,13 @@ const char *tokens[] = { // Must match enum lexical_token (lex.h) + [T_ALIGN] = "align", [T_BREAK] = "break", [T_CONST] = "const", [T_CONTINUE] = "continue", [T_DEFER] = "defer", [T_ELSE] = "else", + [T_ENUM] = "enum", [T_EXTERN] = "extern", [T_FALSE] = "false", [T_FOR] = "for", @@ -22,6 +24,7 @@ const char *tokens[] = { [T_IF] = "if", [T_INCLUDE] = "include", [T_LET] = "let", + [T_PUB] = "pub", [T_RETURN] = "return", [T_STRUCT] = "struct", [T_TRUE] = "true", |