mirror of
https://github.com/AleoHQ/leo.git
synced 2025-01-04 16:15:11 +03:00
simplify grammar rule for conditional statements
This commit is contained in:
parent
3b737b2a34
commit
52f20a0d03
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user