== . - =. - ↔. , == , ==.
= , a = b , a b - . , a ↔ b, a ↔ b, a b . , not a ↔ b (not a) ↔ b not a = b not (a = b).
, = ↔ == , , , , , ==, -.
The reason this is hard to implement is because the parser usually takes precedence over the statement. When the parser translated the source code into the syntax tree, the operator priority is already encoded in the tree. Type checking (if any) works with the syntax tree. Thus, the analyzer does not have access to type information, which implies that it cannot use type information to apply various priority rules.
source
share