Iterator grammar

This commit is contained in:
2026-05-05 17:55:37 +02:00
parent eb4cec50aa
commit ccb6654127
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -68,6 +68,7 @@ statement = _{
| if_stmt
| while_stmt
| c_for_stmt
| for_stmt
| return_stmt
| break_stmt
| continue_stmt
@@ -104,6 +105,10 @@ c_for_stmt = {
"for" ~ "(" ~ statement ~ expr ~ semicolon ~ statement ~ ")" ~ statement
}
for_stmt = {
"for" ~ "(" ~ identifier ~ "in" ~ expr ~ ")" ~ statement
}
// ================= EXPRESSIONS =================
tuple_type = { "(" ~ (type_expr ~ ("," ~ type_expr)*)? ~ ")" }
path_type = { static_path ~ ("<" ~ (type_expr ~ ("," ~ type_expr)*)? ~ ">")? }