diff --git a/example/1.hear b/example/1.hear index 0f9d1ef..a8482c2 100644 --- a/example/1.hear +++ b/example/1.hear @@ -1 +1 @@ -5*3+2 \ No newline at end of file +5*3-2+-4-4 \ No newline at end of file diff --git a/src/Main/Parser/Megaparsec.hs b/src/Main/Parser/Megaparsec.hs index e78c623..a82e02a 100644 --- a/src/Main/Parser/Megaparsec.hs +++ b/src/Main/Parser/Megaparsec.hs @@ -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