From 902940401d1c1e657cdaf3e7bae8cbb89d14ffa9 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 15 Nov 2026 08:57:03 +0100 Subject: added left shift (^<) and right shift (^>) operators Previously you'd have to write `a * 2^*b` for left shift, which is inefficient and cumbersome. --- src/expressions.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/expressions.h') diff --git a/src/expressions.h b/src/expressions.h index 1c1b4e9..5d71cd6 100644 --- a/src/expressions.h +++ b/src/expressions.h @@ -84,15 +84,17 @@ typedef enum { /* * Real operators */ - TECO_OP_POW = 0x60, // ^* - TECO_OP_MOD = 0x50, // ^/ + TECO_OP_OR = 0x10, // # + TECO_OP_XOR = 0x20, // ^# + TECO_OP_AND = 0x30, // & + TECO_OP_SHL = 0x40, // ^< + TECO_OP_SHR, // ^> + TECO_OP_SUB = 0x50, // - + TECO_OP_ADD, // + + TECO_OP_MOD = 0x60, // ^/ TECO_OP_DIV, // / TECO_OP_MUL, // * - TECO_OP_SUB = 0x40, // - - TECO_OP_ADD, // + - TECO_OP_AND = 0x30, // & - TECO_OP_XOR = 0x20, // ^# - TECO_OP_OR = 0x10 // # + TECO_OP_POW = 0x70 // ^* } teco_operator_t; extern gint teco_num_sign; -- cgit v1.2.3