diff --git a/examples/test.lua b/examples/test.lua index ebaa6be..9c0e831 100644 --- a/examples/test.lua +++ b/examples/test.lua @@ -27,4 +27,4 @@ print(b) print(min(11, 9)) print(10 - 15) print("hello there!") -print(nil or 0) \ No newline at end of file +print(true or 0) \ No newline at end of file diff --git a/src/compile.rs b/src/compile.rs index 7231ec8..4d19e58 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -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(), )); } };