diff --git a/components/lox-execute/src/vm.rs b/components/lox-execute/src/vm.rs index f41d902..a3169ae 100644 --- a/components/lox-execute/src/vm.rs +++ b/components/lox-execute/src/vm.rs @@ -114,12 +114,10 @@ impl VM { self.push(a / b); } bytecode::Code::True => { - // FIXME: This should be a boolean, not a float. - self.push(1.0); + self.push(true); }, bytecode::Code::False => { - // FIXME: This should be a boolean, not a float. - self.push(0.0); + self.push(false); }, } } diff --git a/lox_tests/boolean.output b/lox_tests/boolean.output index 0ba91ff..3da3958 100644 --- a/lox_tests/boolean.output +++ b/lox_tests/boolean.output @@ -1,3 +1,3 @@ -Number( - 1.0, +Boolean( + true, ) \ No newline at end of file