From 8818c59cbc96e6b0699a408d2fbaa9846356d85a Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 15 Jan 2016 19:02:04 -0700 Subject: parser: fix not setting container init kind --- src/parser.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/parser.cpp') 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; -- cgit v1.2.3