summaryrefslogtreecommitdiff
path: root/src/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer.c')
-rw-r--r--src/lexer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lexer.c b/src/lexer.c
index 02417a1..938c4eb 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -63,11 +63,13 @@ static char *char_to_string(char c) {
token_t *lexer_collect_bool(lexer_t *lexer) {
lexer_move(lexer);
- if (lexer->c == 't')
+ if (lexer->c == 't') {
+ lexer_move(lexer);
return init_token(TOKEN_BOOL, "T", lexer->row, lexer->col);
- else if (lexer->c == 'f')
+ } else if (lexer->c == 'f') {
+ lexer_move(lexer);
return init_token(TOKEN_BOOL, "F", lexer->row, lexer->col);
- else
+ } else
return NULL;
}