Mercurial > hg-old > index.cgi
comparison lwasm/expr.c @ 203:2c1afbdb2de0
Added |, &, and ^ binary bitwise operators
author | lost |
---|---|
date | Sun, 22 Mar 2009 22:11:12 +0000 |
parents | 0d916bcebb90 |
children | bae1e3ecdce1 |
comparison
equal
deleted
inserted
replaced
202:1a75121c3c3f | 203:2c1afbdb2de0 |
---|---|
621 { LWASM_OPER_MINUS, "-", 100 }, | 621 { LWASM_OPER_MINUS, "-", 100 }, |
622 { LWASM_OPER_TIMES, "*", 150 }, | 622 { LWASM_OPER_TIMES, "*", 150 }, |
623 { LWASM_OPER_DIVIDE, "/", 150 }, | 623 { LWASM_OPER_DIVIDE, "/", 150 }, |
624 { LWASM_OPER_MOD, "%", 150 }, | 624 { LWASM_OPER_MOD, "%", 150 }, |
625 { LWASM_OPER_INTDIV, "\\", 150 }, | 625 { LWASM_OPER_INTDIV, "\\", 150 }, |
626 | |
627 { LWASM_OPER_BWAND, "&", 50 }, | |
628 { LWASM_OPER_BWOR, "|", 50 }, | |
629 | |
630 // this collides with the unary complement but shouldn't cause | |
631 // any trouble because of operator precedence | |
632 { LWASM_OPER_BWXOR, "^", 50 }, | |
626 | 633 |
627 { LWASM_OPER_NONE, "", 0 } | 634 { LWASM_OPER_NONE, "", 0 } |
628 }; | 635 }; |
629 int opern, i; | 636 int opern, i; |
630 lwasm_expr_term_t *operterm; | 637 lwasm_expr_term_t *operterm; |