no operand swap on logical expressions with shortcircuit evaluation (and,or are no longer associative!)

This commit is contained in:
Irmen de Jong
2024-03-20 22:34:39 +01:00
parent 592becc126
commit ad4880997a
5 changed files with 53 additions and 82 deletions

View File

@@ -1,6 +1,6 @@
package prog8.code.core
val AssociativeOperators = setOf("+", "*", "&", "|", "^", "==", "!=", "and", "or", "xor")
val AssociativeOperators = setOf("+", "*", "&", "|", "^", "==", "!=", "xor") // note: and,or are no longer associative because of Shortcircuit/McCarthy evaluation
val ComparisonOperators = setOf("==", "!=", "<", ">", "<=", ">=")
val LogicalOperators = setOf("and", "or", "xor", "not", "in")
val BitwiseOperators = setOf("&", "|", "^", "~")