bitwise operations
This commit is contained in:
+14
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user