mirror of
https://github.com/irmen/prog8.git
synced 2025-08-02 16:24:51 +00:00
fix bug in evaluating logical expressions if one of the operands was not boolean 1 or 0
This commit is contained in:
@@ -13,6 +13,8 @@ import kotlin.math.abs
|
||||
val associativeOperators = setOf("+", "*", "&", "|", "^", "or", "and", "xor", "==", "!=")
|
||||
val comparisonOperators = setOf("==", "!=", "<", ">", "<=", ">=")
|
||||
val augmentAssignmentOperators = setOf("+", "-", "/", "*", "**", "&", "|", "^", "<<", ">>", "%", "and", "or", "xor")
|
||||
val logicalOperators = setOf("and", "or", "xor", "not")
|
||||
|
||||
|
||||
sealed class Expression: Node {
|
||||
abstract fun constValue(program: Program): NumericLiteralValue?
|
||||
|
Reference in New Issue
Block a user