bitwise operations

This commit is contained in:
2026-07-19 00:36:31 +02:00
parent f9448363e4
commit c7e3162ecb
21 changed files with 219439 additions and 140077 deletions
+14 -1
View File
@@ -97,10 +97,17 @@ Expr_Kind :: enum u8 {
Comptime,
Negate,
Not,
Bit_Not,
Add,
Sub,
Mul,
Div,
Bit_And,
Bit_Or,
Bit_Xor,
Shift_Left,
Shift_Right,
Shift_Left_Saturating,
Eq,
Ne,
Lt,
@@ -165,6 +172,12 @@ Assignment_Op :: enum u8 {
Sub,
Mul,
Div,
Bit_And,
Bit_Or,
Bit_Xor,
Shift_Left,
Shift_Right,
Shift_Left_Saturating,
}
Stmt :: struct {
@@ -184,7 +197,7 @@ Stmt :: struct {
error_only: bool,
// Assignments store the lvalue in `target`, the right-hand side in `expr`,
// and the source operator in `assignment_op`. `Set` is ordinary `=`;
// the arithmetic variants are `+=`, `-=`, `*=`, and `/=`.
// the remaining variants preserve their corresponding compound operator.
assignment_op: Assignment_Op,
target: Expr_Id,
expr: Expr_Id,