Control flow

This commit is contained in:
2026-05-21 07:28:19 +02:00
parent 197afbfb35
commit 70e6eb6276
4 changed files with 19 additions and 8 deletions
+11 -1
View File
@@ -343,7 +343,8 @@ block = {
}
statement = _{
(expr ~ semicolon)
control_flow
| (expr ~ semicolon)
}
// ------------------------------------------------------
@@ -377,6 +378,15 @@ var_decl_statement = {
// CONDITIONALS
// ------------------------------------------------------
control_flow = {
if_stmt
| while_stmt
| c_for_stmt
| for_stmt
| match_stmt
| block
}
statement_branch = { "(" ~ expr ~ ")" ~ statement }
else_if = {