changeset 203:2c1afbdb2de0

Added |, &, and ^ binary bitwise operators
author lost
date Sun, 22 Mar 2009 22:11:12 +0000
parents 1a75121c3c3f
children 048ebb85f6ef
files lwasm/expr.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/expr.c	Sun Mar 22 21:20:45 2009 +0000
+++ b/lwasm/expr.c	Sun Mar 22 22:11:12 2009 +0000
@@ -624,6 +624,13 @@
 		{ LWASM_OPER_MOD, "%", 150 },
 		{ LWASM_OPER_INTDIV, "\\", 150 },
 		
+		{ LWASM_OPER_BWAND, "&", 50 },
+		{ LWASM_OPER_BWOR, "|", 50 },
+		
+		// this collides with the unary complement but shouldn't cause
+		// any trouble because of operator precedence
+		{ LWASM_OPER_BWXOR, "^", 50 },
+		
 		{ LWASM_OPER_NONE, "", 0 }
 	};	
 	int opern, i;