zig fmt: fn proto end with anytype and comma

also

zig fmt: space after top level doc comment
This commit is contained in:
Andrew Kelley
2021-02-23 18:23:49 -07:00
parent 08107a555e
commit 988f1c6a6f
3 changed files with 34 additions and 1 deletions

View File

@@ -3706,7 +3706,12 @@ const Parser = struct {
const param = try p.expectParamDecl();
if (param != 0) break param;
switch (p.token_tags[p.nextToken()]) {
.comma => continue,
.comma => {
if (p.eatToken(.r_paren)) |_| {
return SmallSpan{ .zero_or_one = 0 };
}
continue;
},
.r_paren => return SmallSpan{ .zero_or_one = 0 },
else => {
// This is likely just a missing comma;