Short-curcuit boolean operators.

This commit is contained in:
Stephen Chung
2020-03-02 12:08:03 +08:00
parent bedfe55005
commit 22a505b57b
6 changed files with 187 additions and 40 deletions

View File

@@ -149,8 +149,8 @@ impl Engine {
reg_cmp!(self, "==", eq, i32, i64, u32, u64, bool, String, char, f32, f64);
reg_cmp!(self, "!=", ne, i32, i64, u32, u64, bool, String, char, f32, f64);
reg_op!(self, "||", or, bool);
reg_op!(self, "&&", and, bool);
//reg_op!(self, "||", or, bool);
//reg_op!(self, "&&", and, bool);
reg_op!(self, "|", binary_or, i32, i64, u32, u64);
reg_op!(self, "|", or, bool);
reg_op!(self, "&", binary_and, i32, i64, u32, u64);