From 041fdcb0009e1a7a1a1cdbd14d987828c0719253 Mon Sep 17 00:00:00 2001 From: shabani005 Date: Sun, 20 Jul 2025 22:42:44 +0300 Subject: [PATCH] lexer readability --- lexer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lexer.c b/lexer.c index 938512f..57657bd 100644 --- a/lexer.c +++ b/lexer.c @@ -54,7 +54,7 @@ Token read_from_tok(char* text, uint cursor){ Token mytoks; static char buf[64]; size_t i = 0; - if (isdigit(text[cursor])) { + if (isdigit(text[cursor])) { // Start of an integer token size_t start = cursor; while (isdigit(text[cursor])) { @@ -64,7 +64,8 @@ Token read_from_tok(char* text, uint cursor){ mytoks.type = TOKEN_INTEGER; mytoks.text = buf; mytoks.text_len = i; - }else { + } + else { buf[0] = text[cursor]; buf[1] = '\0'; mytoks.text = buf; @@ -110,5 +111,5 @@ int main(){ } else { i++; } -} + } }