diff options
Diffstat (limited to 'src/ast_render.cpp')
| -rw-r--r-- | src/ast_render.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ast_render.cpp b/src/ast_render.cpp index cdc18c7252..4f4dc1decd 100644 --- a/src/ast_render.cpp +++ b/src/ast_render.cpp @@ -661,11 +661,18 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) { const char *layout_str = layout_string(node->data.container_decl.layout); const char *container_str = container_string(node->data.container_decl.kind); fprintf(ar->f, "%s%s", layout_str, container_str); + if (node->data.container_decl.auto_enum) { + fprintf(ar->f, "(enum"); + } if (node->data.container_decl.init_arg_expr != nullptr) { fprintf(ar->f, "("); render_node_grouped(ar, node->data.container_decl.init_arg_expr); fprintf(ar->f, ")"); } + if (node->data.container_decl.auto_enum) { + fprintf(ar->f, ")"); + } + fprintf(ar->f, " {\n"); ar->indent += ar->indent_size; for (size_t field_i = 0; field_i < node->data.container_decl.fields.length; field_i += 1) { |
