fix: statement branch

This commit is contained in:
2026-05-16 07:22:43 +02:00
parent 5174cc34ee
commit 47b179b782
3 changed files with 23 additions and 8 deletions
+5 -3
View File
@@ -357,8 +357,10 @@ assign_statement = {
// CONDITIONALS
// ------------------------------------------------------
statement_branch = { "(" ~ expr ~ ")" ~ statement }
else_if = {
"else" ~ "if" ~ "(" ~ expr ~ ")" ~ statement
"else" ~ "if" ~ statement_branch
}
else_if_list = {
@@ -366,7 +368,7 @@ else_if_list = {
}
if_stmt = {
"if" ~ "(" ~ expr ~ ")" ~ statement ~ else_if_list ~ ("else" ~ statement)?
"if" ~ "(" ~ statement_branch ~ else_if_list ~ ("else" ~ statement)?
}
// ------------------------------------------------------
@@ -374,7 +376,7 @@ if_stmt = {
// ------------------------------------------------------
while_stmt = {
"while" ~ "(" ~ expr ~ ")" ~ statement
"while" ~ statement_branch
}
c_for_stmt = {