feat: allow h : annotation on match discriminants
This commit is contained in:
parent
c8ab63ea75
commit
3ce794c58a
1 changed files with 3 additions and 1 deletions
|
|
@ -106,7 +106,9 @@ withPosition $ fun pos =>
|
|||
(if optionalFirstBar then optional "| " else "| ") >>
|
||||
sepBy1 matchAlt (checkColGe pos.column "alternatives must be indented" >> "|")
|
||||
|
||||
@[builtinTermParser] def «match» := parser!:leadPrec "match " >> sepBy1 termParser ", " >> optType >> " with " >> matchAlts
|
||||
def matchDiscr := optIdent >> termParser
|
||||
|
||||
@[builtinTermParser] def «match» := parser!:leadPrec "match " >> sepBy1 matchDiscr ", " >> optType >> " with " >> matchAlts
|
||||
@[builtinTermParser] def «nomatch» := parser!:leadPrec "nomatch " >> termParser
|
||||
def optExprPrecedence := optional (try ":" >> termParser maxPrec)
|
||||
@[builtinTermParser] def «parser!» := parser!:leadPrec "parser! " >> optExprPrecedence >> termParser
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue