summaryrefslogtreecommitdiff
path: root/src/codegen/codegen_stmt.c
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-26 02:55:51 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-26 02:55:51 +0000
commite310dbff40e60e878032d59fd7c550398ee34e5d (patch)
tree5ef84fbfaf461e9253e75522a7c8798344358183 /src/codegen/codegen_stmt.c
parent2022012d6514578bd53a91b3048d08cf8686e233 (diff)
Fixed duplicate logic and stability issues
Diffstat (limited to 'src/codegen/codegen_stmt.c')
-rw-r--r--src/codegen/codegen_stmt.c14
1 files changed, 1 insertions, 13 deletions
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);