probably better to error on unknown token
This commit is contained in:
parent
8ea48c3e39
commit
b516cecff2
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ consume m ((Token t):ts)
|
|||
| t == "not" = cont $ m `And` (Not next)
|
||||
| t == "(" = let (n, r) = consume next rest in (m `And` n, r)
|
||||
| t == ")" = (m, ts)
|
||||
| otherwise = (m, ts) -- ignore unknown token
|
||||
| otherwise = error $ "unknown token " ++ t
|
||||
where
|
||||
(next, rest) = consume Any ts
|
||||
cont v = (v, rest)
|
||||
|
|
Loading…
Reference in a new issue