From e310dbff40e60e878032d59fd7c550398ee34e5d Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Mon, 26 Jan 2026 02:55:51 +0000 Subject: Fixed duplicate logic and stability issues --- src/codegen/codegen_stmt.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/codegen/codegen_stmt.c') diff --git a/src/codegen/codegen_stmt.c b/src/codegen/codegen_stmt.c index cba55b4..43e5bb5 100644 --- a/src/codegen/codegen_stmt.c +++ b/src/codegen/codegen_stmt.c @@ -70,21 +70,9 @@ static void emit_single_pattern_cond(const char *pat, int id, int is_ptr, FILE * fprintf(out, "strcmp(_m_%d, %s) == 0", id, pat); } } - else if (pat[0] == '\'') - { - // Char literal pattern - if (is_ptr) - { - fprintf(out, "*_m_%d == %s", id, pat); - } - else - { - fprintf(out, "_m_%d == %s", id, pat); - } - } else { - // Numeric or simple pattern + // Numeric, Char literal (removed duplicate branch), or simple pattern if (is_ptr) { fprintf(out, "*_m_%d == %s", id, pat); -- cgit v1.2.3