diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-08-15 12:10:40 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-08-15 12:10:40 +0100 |
commit | cd4c8a3f1b92f0e6a585bd0b199374b8b99c6238 (patch) | |
tree | 5e5512275935f10cc581db271ae34e1a2f4fbaf4 | |
parent | 1d9e66cf712c28b00a284e3674e14a4f966c50e8 (diff) | |
download | micro-lang-hs-cd4c8a3f1b92f0e6a585bd0b199374b8b99c6238.tar.gz micro-lang-hs-cd4c8a3f1b92f0e6a585bd0b199374b8b99c6238.zip |
Better error reporting
These don't need backtracking.
-rw-r--r-- | src/Parser.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Parser.hs b/src/Parser.hs index 851b4c0..765a58b 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -106,9 +106,9 @@ call = do factor :: Parser Expr factor = - try number - <|> try call + number <|> try lambda + <|> try call <|> try variable <|> parens expr @@ -135,7 +135,7 @@ program = do m <- module' n <- many $ do - try function + function -- TODO: variable decl <|> statement <?> "statement" return $ [m] ++ n |