authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-28 15:02:52-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-28 15:02:52-07:00
log9db5b2c5c6a3406e856cc024009ba8cf79f0b942
treee0548188f04ee974f9ab27d616d67095b308f03c
parentdf24ce52b1059232db66e9af425a02df558aa1ca

AstGen: function prototypes can have alignment


1 files changed, 3 insertions(+), 1 deletions(-)

src/AstGen.zig+3-1
...@@ -1041,7 +1041,9 @@ pub fn fnProtoExpr(...@@ -1041,7 +1041,9 @@ pub fn fnProtoExpr(
1041 assert(param_type_i == param_count);1041 assert(param_type_i == param_count);
1042 }1042 }
10431043
1044 assert(fn_proto.ast.align_expr == 0); // caught by the parser1044 if (fn_proto.ast.align_expr != 0) {
1045 return astgen.failNode(fn_proto.ast.align_expr, "TODO: AstGen: implement function prototypes with alignment expressions", .{});
1046 }
1045 assert(fn_proto.ast.section_expr == 0); // caught by the parser1047 assert(fn_proto.ast.section_expr == 0); // caught by the parser
10461048
1047 const maybe_bang = tree.firstToken(fn_proto.ast.return_type) - 1;1049 const maybe_bang = tree.firstToken(fn_proto.ast.return_type) - 1;