aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Parser.hs
diff options
context:
space:
mode:
authorMarvin Borner2023-09-22 00:39:53 +0200
committerMarvin Borner2023-09-22 00:39:53 +0200
commit6a451b6cad18a5b4ba60b6017dbfaa4ab707db8a (patch)
tree6e13d6c502dbb1e89bf596c393ab27f33d4a9ee5 /src/Parser.hs
parent1f985159c3ca5d15a2229a495b2c15a5a1af2dd6 (diff)
Minor improvements
Sorry, don't exactly know and don't care. Just some things I apparently didn't commit
Diffstat (limited to 'src/Parser.hs')
-rw-r--r--src/Parser.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Parser.hs b/src/Parser.hs
index 470c18f..aee282b 100644
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -289,6 +289,12 @@ parseBlc = do
e <- parseExpression
pure $ Blc e
+parseJot :: Parser Command
+parseJot = do
+ _ <- string ":jot" <* sc <?> "jot binary string"
+ str <- some $ noneOf "\r\n"
+ pure $ Jot str
+
parseClearState :: Parser Command
parseClearState = do
_ <- string ":free" <?> "free instruction"
@@ -356,5 +362,6 @@ parseReplLine =
<|> (Commands . (: []) <$> try parseTime)
<|> (Commands . (: []) <$> try parseLength)
<|> (Commands . (: []) <$> try parseBlc)
+ <|> (Commands . (: []) <$> try parseJot)
<|> (Commands . (: []) <$> try parseClearState)
<|> try parseEvaluate