Iterator grammar
This commit is contained in:
@@ -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)*)? ~ ">")? }
|
||||
|
||||
Reference in New Issue
Block a user