C style for loop grammar
This commit is contained in:
@@ -67,6 +67,7 @@ statement = _{
|
||||
| assign_statement
|
||||
| if_stmt
|
||||
| while_stmt
|
||||
| c_for_stmt
|
||||
| return_stmt
|
||||
| break_stmt
|
||||
| continue_stmt
|
||||
@@ -99,6 +100,10 @@ while_stmt = {
|
||||
"while" ~ "(" ~ expr ~ ")" ~ statement
|
||||
}
|
||||
|
||||
c_for_stmt = {
|
||||
"for" ~ "(" ~ statement ~ expr ~ ";" ~ statement ~ ")" ~ statement
|
||||
}
|
||||
|
||||
// ================= EXPRESSIONS =================
|
||||
tuple_type = { "(" ~ (type_expr ~ ("," ~ type_expr)*)? ~ ")" }
|
||||
path_type = { static_path ~ ("<" ~ (type_expr ~ ("," ~ type_expr)*)? ~ ">")? }
|
||||
|
||||
Reference in New Issue
Block a user