Open yigitozkavci opened 7 years ago
In the kicking-the-tires part, we used:
def binary == 9 (LHS, RHS) = !(LHS < RHS | LHS > RHS);
However, precedence of | should be higher than both < and > in order to use it properly without brackets. These two expressions are being evaluated to two different results now:
|
<
>
putchar(30 < 31 | 30 > 31); # 0.0, wrong putchar((30 < 31) | (30 > 31)); # 1.0, right
It's fixed by adding binary ">" Ex.AssocLeft just in near binary "<" Ex.AssocLeft in the parser, but don't know if it's the right solution.
binary ">" Ex.AssocLeft
binary "<" Ex.AssocLeft
In the kicking-the-tires part, we used:
However, precedence of
|
should be higher than both<
and>
in order to use it properly without brackets. These two expressions are being evaluated to two different results now:It's fixed by adding
binary ">" Ex.AssocLeft
just in nearbinary "<" Ex.AssocLeft
in the parser, but don't know if it's the right solution.