From cd4c8a3f1b92f0e6a585bd0b199374b8b99c6238 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 15 Aug 2022 12:10:40 +0100 Subject: Better error reporting These don't need backtracking. --- src/Parser.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Parser.hs') 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 -- cgit v1.2.3