From 17d88444d15d09929719828a768e07db31c94c91 Mon Sep 17 00:00:00 2001 From: shabani005 Date: Sun, 20 Jul 2025 22:40:11 +0300 Subject: [PATCH] lexer fix --- lexer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lexer.c b/lexer.c index bcb9376..938512f 100644 --- a/lexer.c +++ b/lexer.c @@ -23,6 +23,7 @@ typedef enum{ TOKEN_PLUS, TOKEN_MINUS, TOKEN_INTEGER, + TOKEN_SPACE, intdef, TOKEN_UNKNOWN, } symbols; @@ -78,8 +79,12 @@ Token read_from_tok(char* text, uint cursor){ mytoks.type = TOKEN_MINUS; mytoks.text = "-"; break; + case ' ': + mytoks.type = TOKEN_SPACE; + mytoks.text = "space"; + break; default: - mytoks.type = TOKEN_UNKNOWN; + mytoks.type = TOKEN_UNKNOWN; } } return mytoks;