From 95da4a56fa3fda80761c7453ce1dd2277c252103 Mon Sep 17 00:00:00 2001 From: Matteo Flebus Date: Mon, 19 Jan 2026 17:56:08 +0100 Subject: [PATCH] Revert "fix(lexer): lexing_mode depending on quote" This reverts commit ed4c3d475c35f875c60b066e22ebf113789efe43. --- src/lexer/lexer.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/lexer/lexer.c b/src/lexer/lexer.c index 2505649..fd54c98 100644 --- a/src/lexer/lexer.c +++ b/src/lexer/lexer.c @@ -270,13 +270,8 @@ struct token *peek_token(void) while (i < remaining_chars) { - // true if encountered a quotes of any type at stream[i] - if (update_lexing_mode(stream, i, &lexing_mode)) - { - i++; - continue; - } - else + // true if we didn't encounter a quotes of any type at stream[i] + if (!update_lexing_mode(stream, i, &lexing_mode)) { if (is_special_char(stream[i])) { @@ -314,13 +309,8 @@ struct token *pop_token(void) while (i < remaining_chars) { - // true if encountered a quotes of any type at stream[i] - if (update_lexing_mode(stream, i, &lexing_mode)) - { - i++; - continue; - } - else + // true if we didn't encounter a quotes of any type at stream[i] + if (!update_lexing_mode(stream, i, &lexing_mode)) { if (is_special_char(stream[i])) {