aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Parser.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Parser.hs')
-rw-r--r--src/Parser.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Parser.hs b/src/Parser.hs
index d796682..392d4a6 100644
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -269,6 +269,18 @@ parseTime = do
e <- parseExpression
pure $ Time e
+parseLength :: Parser Command
+parseLength = do
+ _ <- string ":length" <* sc <?> "length instruction"
+ e <- parseExpression
+ pure $ Length e
+
+parseBlc :: Parser Command
+parseBlc = do
+ _ <- string ":blc" <* sc <?> "blc instruction"
+ e <- parseExpression
+ pure $ Blc e
+
parseClearState :: Parser Command
parseClearState = do
_ <- string ":free" <?> "free instruction"
@@ -334,5 +346,7 @@ parseReplLine =
<|> (Commands . (: []) <$> try parseWatch)
<|> (Commands . (: []) <$> try parseImport)
<|> (Commands . (: []) <$> try parseTime)
+ <|> (Commands . (: []) <$> try parseLength)
+ <|> (Commands . (: []) <$> try parseBlc)
<|> (Commands . (: []) <$> try parseClearState)
<|> try parseEvaluate