aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-01-15 19:02:04 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-01-15 19:02:04 -0700
commit8818c59cbc96e6b0699a408d2fbaa9846356d85a (patch)
treed99fff9c50625f7e4574e257d129c231d87d93f3 /src/parser.cpp
parentdc162c7f8385d82f1e5513a5412b98ec8c70e993 (diff)
downloadzig-8818c59cbc96e6b0699a408d2fbaa9846356d85a.tar.gz
zig-8818c59cbc96e6b0699a408d2fbaa9846356d85a.zip
parser: fix not setting container init kind
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 2b2e8736be..882db56b6c 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -1423,6 +1423,7 @@ static AstNode *ast_parse_curly_suffix_expr(ParseContext *pc, int *token_index,
Token *token = &pc->tokens->at(*token_index);
if (token->id == TokenIdDot) {
+ node->data.container_init_expr.kind = ContainerInitKindStruct;
for (;;) {
if (token->id == TokenIdDot) {
ast_eat_token(pc, token_index, TokenIdDot);
@@ -1456,6 +1457,7 @@ static AstNode *ast_parse_curly_suffix_expr(ParseContext *pc, int *token_index,
}
} else {
+ node->data.container_init_expr.kind = ContainerInitKindArray;
for (;;) {
if (token->id == TokenIdRBrace) {
*token_index += 1;