Implement comparison operators
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user