aboutsummaryrefslogtreecommitdiff
path: root/src/ast_render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast_render.cpp')
-rw-r--r--src/ast_render.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ast_render.cpp b/src/ast_render.cpp
index faebd8f7a3..72906610a4 100644
--- a/src/ast_render.cpp
+++ b/src/ast_render.cpp
@@ -464,8 +464,10 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
}
print_indent(ar);
render_node_grouped(ar, statement);
- if (i != node->data.block.statements.length - 1)
+ if (!(i == node->data.block.statements.length - 1 &&
+ node->data.block.last_statement_is_result_expression)) {
fprintf(ar->f, ";");
+ }
fprintf(ar->f, "\n");
}
ar->indent -= ar->indent_size;