aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorVexu <git@vexu.eu>2020-07-11 20:35:00 +0300
committerAndrew Kelley <andrew@ziglang.org>2020-07-12 07:35:34 +0000
commitbfe9d4184fb9b4d0cfd0964f18bb3789f3023939 (patch)
tree5f945985b4cf4df78e1bd86831eb3545bbe8eaaf /src/parser.cpp
parentfe08a4d0654b4d73b78f65cf1a31a037002e2243 (diff)
downloadzig-bfe9d4184fb9b4d0cfd0964f18bb3789f3023939.tar.gz
zig-bfe9d4184fb9b4d0cfd0964f18bb3789f3023939.zip
fix alignment parsing in stage1
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index fcd1133b0d..26233ec6a4 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -2679,7 +2679,7 @@ static AstNode *ast_parse_prefix_type_op(ParseContext *pc) {
if (eat_token_if(pc, TokenIdKeywordAlign) != nullptr) {
expect_token(pc, TokenIdLParen);
- AstNode *align_expr = ast_parse_expr(pc);
+ AstNode *align_expr = ast_expect(pc, ast_parse_expr);
child->data.pointer_type.align_expr = align_expr;
if (eat_token_if(pc, TokenIdColon) != nullptr) {
Token *bit_offset_start = expect_token(pc, TokenIdIntLiteral);