From 52f20a0d03233377b287feb8729c2c35a36b047f Mon Sep 17 00:00:00 2001 From: collin Date: Wed, 2 Sep 2020 12:28:54 -0700 Subject: [PATCH] simplify grammar rule for conditional statements --- ast/src/leo.pest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ast/src/leo.pest b/ast/src/leo.pest index dc350cd0f4..8dd3aed740 100644 --- a/ast/src/leo.pest +++ b/ast/src/leo.pest @@ -359,7 +359,7 @@ statement = { statement_assign = { assignee ~ operation_assign ~ expression ~ LINE_END } // Declared in statements/conditional_statement.rs -statement_conditional = {"if " ~ (expression | "(" ~ expression ~ ")") ~ "{" ~ NEWLINE* ~ statement+ ~ "}" ~ ("else " ~ conditional_nested_or_end_statement)?} +statement_conditional = {"if " ~ expression ~ "{" ~ NEWLINE* ~ statement+ ~ "}" ~ ("else " ~ conditional_nested_or_end_statement)?} conditional_nested_or_end_statement = { statement_conditional | "{" ~ NEWLINE* ~ statement+ ~ "}"} // Declared in statements/definition_statement.rs