diff --git a/docs/sophia_syntax.md b/docs/sophia_syntax.md index a49eb0e..9a4b748 100644 --- a/docs/sophia_syntax.md +++ b/docs/sophia_syntax.md @@ -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 ```