diff --git a/parser/src/grammar.pest b/parser/src/grammar.pest index e19f0e9..603f96d 100644 --- a/parser/src/grammar.pest +++ b/parser/src/grammar.pest @@ -16,7 +16,7 @@ export = { "public" } mutable = { "mut" } sharp = _{ "#" } var_decl = { type_expr ~ mutable? ~ identifier } -semicolon = { ";" } +semicolon = _{ ";" } // ================= TOP LEVEL ================= @@ -101,7 +101,7 @@ while_stmt = { } c_for_stmt = { - "for" ~ "(" ~ statement ~ expr ~ ";" ~ statement ~ ")" ~ statement + "for" ~ "(" ~ statement ~ expr ~ semicolon ~ statement ~ ")" ~ statement } // ================= EXPRESSIONS =================