Fix or and and operators
This commit is contained in:
parent
f6548019e3
commit
e259bae865
@ -27,4 +27,4 @@ print(b)
|
||||
print(min(11, 9))
|
||||
print(10 - 15)
|
||||
print("hello there!")
|
||||
print(nil or 0)
|
||||
print(true or 0)
|
||||
@ -484,15 +484,15 @@ impl Expression {
|
||||
BinaryOperator::And => {
|
||||
instructions.push(Instruction::And(
|
||||
reg,
|
||||
*rhs.get(0).unwrap(),
|
||||
*lhs.get(0).unwrap(),
|
||||
*rhs.get(0).unwrap(),
|
||||
));
|
||||
}
|
||||
BinaryOperator::Or => {
|
||||
instructions.push(Instruction::Or(
|
||||
reg,
|
||||
*rhs.get(0).unwrap(),
|
||||
*lhs.get(0).unwrap(),
|
||||
*rhs.get(0).unwrap(),
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user