From 582040e5d3f6a5fb5b9046964b6823891d2802dd Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 13 Oct 2024 12:59:47 +0200 Subject: Implement comparison operators --- lib/Language/Elna/Frontend/Parser.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/Language/Elna/Frontend/Parser.hs') diff --git a/lib/Language/Elna/Frontend/Parser.hs b/lib/Language/Elna/Frontend/Parser.hs index 9dd3206..e85f3b1 100644 --- a/lib/Language/Elna/Frontend/Parser.hs +++ b/lib/Language/Elna/Frontend/Parser.hs @@ -105,12 +105,12 @@ conditionP = do conditionCons lhs <$> expressionP where comparisonOperator = - --, symbol "<" >> pure LessCondition - --, symbol "<=" >> pure LessOrEqualCondition - --, symbol ">" >> pure GreaterCondition - --, symbol ">=" >> pure GreaterOrEqualCondition - [ symbol "=" >> pure EqualCondition - --, symbol "#" >> pure NonEqualCondition + [ symbol "<=" >> pure LessOrEqualCondition + , symbol "<" >> pure LessCondition + , symbol ">=" >> pure GreaterOrEqualCondition + , symbol ">" >> pure GreaterCondition + , symbol "=" >> pure EqualCondition + , symbol "#" >> pure NonEqualCondition ] symbol :: Text -> Parser Text @@ -183,8 +183,8 @@ statementP :: Parser Statement statementP = EmptyStatement <$ semicolonP <|> ifElseP - {-<|> CompoundStatement <$> blockP (many statementP) - <|> try assignmentP + <|> CompoundStatement <$> blockP (many statementP) + {-<|> try assignmentP <|> try whileP -} <|> callP "statement" -- cgit v1.2.3