diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-02-04 10:22:07 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-02-04 10:22:07 -0500 |
| commit | 0919ea0afd11a5f88146f84e8120cdd03b128b81 (patch) | |
| tree | ae7ea0e9768b148e369c825b6a2302b673d997aa /src/ast_render.cpp | |
| parent | 67b02326f88805df8bbda5e93d1cf46e40c48862 (diff) | |
| download | zig-0919ea0afd11a5f88146f84e8120cdd03b128b81.tar.gz zig-0919ea0afd11a5f88146f84e8120cdd03b128b81.zip | |
ability to set global variable alignment and ...
..section in the initialization expression
Diffstat (limited to 'src/ast_render.cpp')
| -rw-r--r-- | src/ast_render.cpp | 4 |
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: { |
