Parse negative numbers
parent
d14c5ace00
commit
d40467bc00
|
@ -1 +1 @@
|
|||
5*3+2
|
||||
5*3-2+-4-4
|
|
@ -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
|
||||
|
|
Reference in New Issue