feature/comparisons #29

Merged
me merged 8 commits from feature/comparisons into main 2023-10-23 17:31:28 +00:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit f436c6bc71 - Show all commits

View file

@ -1,5 +1,5 @@
printInt(5*(3-2)+-4-4);
printBool(true);
printBool(false);
printBool(5 * 3 > 5 + 9);
printBool(5 * 3 >= 5 + 9);
printBool(5*(3-2)+-4-4 < -3);

View file

@ -59,12 +59,12 @@ intOrdCmpExpr = do
b <- intExpr
a <-
choice
[ M.GT <$ symbol ">",
M.GTE <$ symbol ">=",
[ M.GTE <$ string ">=" <* C.space,
M.LTE <$ string "<=" <* C.space,
M.GT <$ string ">" <* C.space,
-- M.Eq <$ string "==",
-- M.Neq <$ string "!=",
M.LTE <$ symbol "<=",
M.LT <$ symbol "<"
M.LT <$ string "<" <* C.space
]
c <- intExpr
return (a, b, c)