Fix GTE and LTE not parsing

pull/29/head
Ethan Reece 2023-10-14 20:54:59 -05:00
parent a75b0df9bc
commit f436c6bc71
Signed by: me
GPG Key ID: D3993665FF92E1C3
2 changed files with 5 additions and 5 deletions

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)