aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Parser.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Parser.hs')
-rw-r--r--src/Parser.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Parser.hs b/src/Parser.hs
index 12214a0..470c18f 100644
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -118,13 +118,14 @@ parseNumeral :: Parser Expression
parseNumeral = do
_ <- string "(" <?> "number start"
num <- number <?> "signed number"
- base <- try (oneOf "ubt") <|> return 't'
+ base <- try (oneOf "dubt") <|> return 't'
_ <- string ")" <?> "number end"
pure $ f base num
where
f 't' = decimalToTernary
f 'b' = decimalToBinary
f 'u' = decimalToUnary
+ f 'd' = decimalToDeBruijn
f _ = invalidProgramState
sign :: Parser (Integer -> Integer)
sign = (char '-' >> return negate) <|> (char '+' >> return id)