Add guarded case for switches

This commit is contained in:
Gaith Hallak 2022-08-03 00:26:06 +04:00
parent c4061701b0
commit 7623cc2f35

View File

@ -182,6 +182,10 @@ LetDef ::= Id Args [':' Type] '=' Block(Stmt) // Function definition
| Pattern '=' Block(Stmt) // Value definition
Case ::= Pattern '=>' Block(Stmt)
| Pattern Block(GuardedCase)
GuardedCase ::= '|' Sep1(Expr, ',') '=>' Block(Stmt)
Pattern ::= Expr
```