Parse negative numbers

This commit is contained in:
Ethan Reece 2023-09-30 04:35:15 -05:00
parent d14c5ace00
commit d40467bc00
Signed by: me
GPG key ID: D3993665FF92E1C3
2 changed files with 2 additions and 2 deletions

View file

@ -1 +1 @@
5*3+2
5*3-2+-4-4

View file

@ -23,7 +23,7 @@ symbol :: Text -> Parser Text
symbol = L.symbol C.space
int :: Parser Int
int = lexeme L.decimal
int = lexeme $ L.signed (return ()) L.decimal
term :: Parser Expr
term = Lit <$> int