Release v0.2.1 #6

Merged
boranseckin merged 9 commits from dev into main 2023-06-29 18:13:23 -04:00
boranseckin commented 2023-06-29 18:06:54 -04:00 (Migrated from github.com)

In this update, all binary and unary expressions are refactored. By overloading Rust's std::ops and std::cmp, all operations are delegated to their respected implementators. This way, I don't have to use a match statement with hundreds of branches to cover every single comparison between different types of objects.

Both EqualEqual and BangEqual are now able to compare every rocks object. This way we can check equality between types and against the null type. This is especially important for preventing uninitialized variables and functions with no return values.

Arithmetic operations and comparisons (other than equality) still require identical literals types on both sides but the error messages are much improved to show the differences.

To support this change, I also added many test cases that will hopefully catch the regression on binary and unary operations from now on.

In this update, all binary and unary expressions are refactored. By overloading Rust's [std::ops](https://doc.rust-lang.org/std/ops/) and [std::cmp](https://doc.rust-lang.org/std/cmp/), all operations are delegated to their respected implementators. This way, I don't have to use a match statement with hundreds of branches to cover every single comparison between different types of objects. Both EqualEqual and BangEqual are now able to compare every rocks object. This way we can check equality between types and against the null type. This is especially important for preventing uninitialized variables and functions with no return values. Arithmetic operations and comparisons (other than equality) still require identical literals types on both sides but the error messages are much improved to show the differences. To support this change, I also added many test cases that will hopefully catch the regression on binary and unary operations from now on.
Sign in to join this conversation.
No description provided.