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 4464a06376..1d3f8489b7 100644
--- a/src/ast_render.cpp
+++ b/src/ast_render.cpp
@@ -628,6 +628,7 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
if (entry->type == NodeTypeStructValueField) {
Buf *name = entry->data.struct_val_field.name;
AstNode *expr = entry->data.struct_val_field.expr;
+ print_indent(ar);
fprintf(ar->f, ".%s = ", buf_ptr(name));
render_node_grouped(ar, expr);
fprintf(ar->f, ",\n");
@@ -637,10 +638,11 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
render_node_grouped(ar, entry);
}
}
- fprintf(ar->f, "}");
if (node->data.container_init_expr.kind == ContainerInitKindStruct) {
ar->indent -= ar->indent_size;
}
+ print_indent(ar);
+ fprintf(ar->f, "}");
break;
case NodeTypeArrayType:
{