diff options
| author | hachem <im@hachem.wtf> | 2026-09-08 12:16:51 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-08 12:16:51 +0200 |
| commit | 60c0e084b159801a45570b56f152f0f5e9193d72 (patch) | |
| tree | ad6c72d6782ab5d9edff336e1e852ca7b995bcdc /src/lexer.c | |
| parent | 9d47486aac9cd1a4422b78ee273b7a27bf7b733a (diff) | |
feat: add while loops
Diffstat (limited to 'src/lexer.c')
| -rw-r--r-- | src/lexer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lexer.c b/src/lexer.c index 0d26f9a..b7fec3c 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -39,6 +39,7 @@ static enum TokenType identifier_type(const char* start, size_t length) { "stack", 5, TOKEN_STACK }, { "if", 2, TOKEN_IF }, { "else", 4, TOKEN_ELSE }, + { "while", 5, TOKEN_WHILE }, { "goto", 4, TOKEN_GOTO }, { "syscall", 7, TOKEN_SYSCALL }, { "byte", 4, TOKEN_BYTE }, @@ -268,6 +269,7 @@ const char* token_type_name(enum TokenType type) case TOKEN_STACK: return "stack"; case TOKEN_IF: return "if"; case TOKEN_ELSE: return "else"; + case TOKEN_WHILE: return "while"; case TOKEN_GOTO: return "goto"; case TOKEN_SYSCALL: return "syscall"; case TOKEN_BYTE: return "byte"; |
