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 3f47c1379c..0a6c856da9 100644
--- a/src/ast_render.cpp
+++ b/src/ast_render.cpp
@@ -459,8 +459,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;