Control flow
This commit is contained in:
+11
-1
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user