Parse until eof

This commit is contained in:
Joscha 2020-12-13 20:31:48 +00:00
parent 8a81cd9e77
commit 659f1a9d33

View file

@ -72,7 +72,7 @@ pDefs = many pDef
parseHelper :: Parser a -> FilePath -> T.Text -> Either T.Text a
parseHelper p path input
= first (T.pack . errorBundlePretty)
$ parse (space *> p) path input
$ parse (space *> p <* eof) path input
parseTerms :: FilePath -> T.Text -> Either T.Text [Term T.Text]
parseTerms = parseHelper pTerms