bugfix with reducing statements
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 23 Feb 2021 16:49:58 +0000 (10:49 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 23 Feb 2021 16:49:58 +0000 (10:49 -0600)
bin/onyx
onyx.exe
src/onyxastnodes.c

index 91908319f54970383784e0500d29173658be425b..eec960022798d5999eda7eb6af044dedb2fed879 100755 (executable)
Binary files a/bin/onyx and b/bin/onyx differ
index 1639c4d33ae7448de304f5ae9976b0db2603b460..605ae113037b54ed81481726bd095ca174b1b053 100644 (file)
Binary files a/onyx.exe and b/onyx.exe differ
index 0bc14181594a7aa1c69a9555bb8333f2c3dba944..d60615063724f25494feacd153bf28de426698a8 100644 (file)
@@ -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(-);