From: Brendan Hansen Date: Tue, 23 Feb 2021 16:49:58 +0000 (-0600) Subject: bugfix with reducing statements X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=4002aa0759b063a1fb6a13753ba324dfec789a3f;p=onyx.git bugfix with reducing statements --- diff --git a/bin/onyx b/bin/onyx index 91908319..eec96002 100755 Binary files a/bin/onyx and b/bin/onyx differ diff --git a/onyx.exe b/onyx.exe index 1639c4d3..605ae113 100644 Binary files a/onyx.exe and b/onyx.exe differ diff --git a/src/onyxastnodes.c b/src/onyxastnodes.c index 0bc14181..d6061506 100644 --- a/src/onyxastnodes.c +++ b/src/onyxastnodes.c @@ -192,6 +192,7 @@ AstNumLit* ast_reduce_binop(bh_allocator a, AstBinaryOp* node) { res->flags |= Ast_Flag_Comptime; res->type_node = node->type_node; res->type = node->type; + res->next = node->next; switch (node->operation) { case Binary_Op_Add: REDUCE_BINOP_ALL(+); @@ -254,6 +255,7 @@ AstTyped* ast_reduce_unaryop(bh_allocator a, AstUnaryOp* unop) { res->flags |= Ast_Flag_Comptime; res->type_node = unop->type_node; res->type = unop->type; + res->next = unop->next; switch (unop->operation) { case Unary_Op_Negate: REDUCE_UNOP(-);