aboutsummaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/parser.c b/src/parser.c
index 45961b0..ea8f00e 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -67,9 +67,11 @@ fwdnode(ast_t ast, idx_t i)
i = ast.kids[i].rhs;
break;
case ASTBINADD:
+ case ASTBINAND:
case ASTBINDIV:
case ASTBINMOD:
case ASTBINMUL:
+ case ASTBINIOR:
case ASTBINSHL:
case ASTBINSHR:
case ASTBINSUB:
@@ -281,14 +283,8 @@ idx_t
parseexprinc(ast_t *ast, lexemes_t toks, idx_t lhs, int minprec)
{
static const int prectbl[UINT8_MAX + 1] = {
- ['+'] = 1,
- ['-'] = 1,
- ['~'] = 1,
- ['%'] = 2,
- ['*'] = 2,
- ['/'] = 2,
- [LEXLANGL_DBL] = 2,
- [LEXRANGL_DBL] = 2,
+ ['+'] = 1, ['-'] = 1, ['|'] = 1, ['~'] = 1, ['%'] = 2,
+ ['&'] = 2, ['*'] = 2, ['/'] = 2, [LEXLANGL_DBL] = 2, [LEXRANGL_DBL] = 2,
};
uint8_t op = toks.kinds[toksidx];