From 8cc4d2885957fdf440012cde3b10593ec87729e4 Mon Sep 17 00:00:00 2001 From: Natan Scalvence Date: Tue, 14 Jan 2025 23:47:04 -0300 Subject: [PATCH] feat(while): Added while statement. --- src/frontend/lexer/lexer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/lexer/lexer.c b/src/frontend/lexer/lexer.c index 3f1c806..2e5b77e 100644 --- a/src/frontend/lexer/lexer.c +++ b/src/frontend/lexer/lexer.c @@ -135,6 +135,7 @@ TokenType match_keyword(const char *lexeme) { if (strcmp(lexeme, "if") == 0) return TOKEN_IF; if (strcmp(lexeme, "elif") == 0) return TOKEN_ELIF; if (strcmp(lexeme, "else") == 0) return TOKEN_ELSE; + if (strcmp(lexeme, "while") == 0) return TOKEN_WHILE; if (strcmp(lexeme, "switch") == 0) return TOKEN_SWITCH; if (strcmp(lexeme, "case") == 0) return TOKEN_CASE; if (strcmp(lexeme, "default") == 0) return TOKEN_DEFAULT;