aboutsummaryrefslogtreecommitdiff
path: root/src/Parser.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-08-15 12:10:40 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-08-15 12:10:40 +0100
commitcd4c8a3f1b92f0e6a585bd0b199374b8b99c6238 (patch)
tree5e5512275935f10cc581db271ae34e1a2f4fbaf4 /src/Parser.hs
parent1d9e66cf712c28b00a284e3674e14a4f966c50e8 (diff)
downloadmicro-lang-hs-cd4c8a3f1b92f0e6a585bd0b199374b8b99c6238.tar.gz
micro-lang-hs-cd4c8a3f1b92f0e6a585bd0b199374b8b99c6238.zip
Better error reporting
These don't need backtracking.
Diffstat (limited to 'src/Parser.hs')
-rw-r--r--src/Parser.hs6
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