mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-16 10:52:22 -07:00
For bit_set, allow + and - to be aliases for | and &~, respectively
This commit is contained in:
@@ -6311,6 +6311,13 @@ handle_op:
|
||||
lbValue res = {};
|
||||
res.type = type;
|
||||
|
||||
// NOTE(bill): Bit Set Aliases for + and -
|
||||
if (is_type_bit_set(type)) {
|
||||
switch (op) {
|
||||
case Token_Add: op = Token_Or; break;
|
||||
case Token_Sub: op = Token_AndNot; break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (op) {
|
||||
case Token_Add:
|
||||
|
||||
Reference in New Issue
Block a user