Commit ee42caee0e

Josh Wolfe <thejoshwolfe@gmail.com>
2017-09-21 08:49:46
fix chain assignment semicolon
1 parent d7775e3
Changed files (2)
src/parsec.cpp
@@ -985,6 +985,7 @@ static AstNode *trans_create_assign(Context *c, bool result_used, AstNode *block
 
         // _tmp
         child_block->data.block.statements.append(trans_create_node_symbol(c, tmp_var_name));
+        child_block->data.block.last_statement_is_result_expression = true;
 
         return child_block;
     }
test/parsec.zig
@@ -478,7 +478,7 @@ pub fn addCases(cases: &tests.ParseCContext) {
         \\    c = {
         \\        const _tmp = a;
         \\        b = _tmp;
-        \\        _tmp;
+        \\        _tmp
         \\    };
         \\}
     );