aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-01-31 17:17:00 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-01-31 17:17:00 -0700
commit773cd851fe83d1ee89d7e0ca9e7ad7327d2962c9 (patch)
tree9e580e8c238649ef67f0bec787256420c2105ae5 /src/parser.cpp
parent105317285402befe75289c20c4b12fccbe94aa08 (diff)
downloadzig-773cd851fe83d1ee89d7e0ca9e7ad7327d2962c9.tar.gz
zig-773cd851fe83d1ee89d7e0ca9e7ad7327d2962c9.zip
parser: fix parsing of type decls
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 f81206357f..de18a57ff6 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -2508,6 +2508,8 @@ static AstNode *ast_parse_type_decl(ParseContext *pc, int *token_index,
ast_buf_from_token(pc, name_tok, &node->data.type_decl.symbol);
node->data.type_decl.child_type = ast_parse_prefix_op_expr(pc, token_index, true);
+ ast_eat_token(pc, token_index, TokenIdSemicolon);
+
node->data.type_decl.visib_mod = visib_mod;
node->data.type_decl.directives = directives;