From: Brendan Hansen Date: Tue, 28 Jul 2020 18:29:30 +0000 (-0500) Subject: Small bugfixes X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=be7aba3a641329bfc29e200294fc85ad12a50111;p=onyx.git Small bugfixes --- diff --git a/onyx b/onyx index 1174de4d..aa0c500c 100755 Binary files a/onyx and b/onyx differ diff --git a/src/onyxparser.c b/src/onyxparser.c index ea134310..fe58c454 100644 --- a/src/onyxparser.c +++ b/src/onyxparser.c @@ -382,6 +382,9 @@ static inline i32 get_precedence(BinaryOp kind) { case Binary_Op_And: return 5; case Binary_Op_Or: return 5; case Binary_Op_Xor: return 5; + case Binary_Op_Shl: return 5; + case Binary_Op_Shr: return 5; + case Binary_Op_Sar: return 5; case Binary_Op_Add: return 6; case Binary_Op_Minus: return 6; diff --git a/src/onyxsymres.c b/src/onyxsymres.c index a2bb3097..cd04a31f 100644 --- a/src/onyxsymres.c +++ b/src/onyxsymres.c @@ -489,7 +489,7 @@ static void symres_memres(AstMemRes** memres) { (*memres)->type_node = symres_type((*memres)->type_node); (*memres)->type = type_build_from_ast(semstate.allocator, (*memres)->type_node); - if ((*memres)->type->kind != Type_Kind_Array) { + if ((*memres)->type->kind != Type_Kind_Array && (*memres)->type->kind != Type_Kind_Struct) { Type* ptr_type = type_make_pointer(semstate.allocator, (*memres)->type); (*memres)->type = ptr_type;