add case0
to syntax since that is possible sometimes
This commit is contained in:
parent
3f3079c48d
commit
38dbd275a1
3 changed files with 3 additions and 3 deletions
|
@ -185,7 +185,7 @@ reserved =
|
|||
Sym "∷" `Or` Sym "::",
|
||||
Punc1 '.',
|
||||
Word1 "case",
|
||||
Word1 "case1",
|
||||
Word1 "case0", Word1 "case1",
|
||||
Word "caseω" `Or` Word "case#",
|
||||
Word1 "return",
|
||||
Word1 "of",
|
||||
|
|
|
@ -165,7 +165,7 @@ lamIntro = symbolsC [(Lam, "λ"), (DLam, "δ")]
|
|||
|
||||
private covering
|
||||
caseIntro : Grammar True Qty
|
||||
caseIntro = symbols [(One, "case1"), (Any, "caseω")]
|
||||
caseIntro = symbols [(Zero, "case0"), (One, "case1"), (Any, "caseω")]
|
||||
<|> resC "case" *>
|
||||
(qty <* resC "." <|>
|
||||
fatalError {c = True} "missing quantity on 'case'")
|
||||
|
|
|
@ -100,7 +100,7 @@ tests = "lexer" :- [
|
|||
lexes "caseω" [Reserved "caseω"],
|
||||
lexes "case#" [Reserved "caseω"],
|
||||
lexes "case1" [Reserved "case1"],
|
||||
lexes "case0" [Name "case0"],
|
||||
lexes "case0" [Reserved "case0"],
|
||||
lexes "case##" [Name "case##"],
|
||||
|
||||
lexes "_" [Reserved "_"],
|
||||
|
|
Loading…
Reference in a new issue