For bit_set, allow + and - to be aliases for | and &~, respectively

This commit is contained in:
gingerBill
2021-03-23 23:34:01 +00:00
parent 082381284c
commit fc1a352285
3 changed files with 31 additions and 2 deletions
+7
View File
@@ -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: