diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-12 01:40:31 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-12 01:40:31 +0000 |
| commit | 5502160bd23f14b91ac2bd3726a93bdd0b40cc53 (patch) | |
| tree | 81ced0f54f4c02eb7fd3bdd5d3d1248014f356a6 /src/ast_render.cpp | |
| parent | ae0a219d1f5495acc4d82421fa24d84186c2a40d (diff) | |
| parent | 0c315e7f7613b085a203e9c94d222e846b5b9e46 (diff) | |
| download | zig-5502160bd23f14b91ac2bd3726a93bdd0b40cc53.tar.gz zig-5502160bd23f14b91ac2bd3726a93bdd0b40cc53.zip | |
Merge pull request #3652 from ziglang/anon-container-lit
implement anonymous struct literals and anonymous list literals
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 c016f629d1..34cbed245a 100644 --- a/src/ast_render.cpp +++ b/src/ast_render.cpp @@ -821,7 +821,9 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) { break; } case NodeTypeContainerInitExpr: - render_node_ungrouped(ar, node->data.container_init_expr.type); + if (node->data.container_init_expr.type != nullptr) { + render_node_ungrouped(ar, node->data.container_init_expr.type); + } if (node->data.container_init_expr.kind == ContainerInitKindStruct) { fprintf(ar->f, "{\n"); ar->indent += ar->indent_size; |
