zig fmt: for loop with ptr payload and index

This commit is contained in:
Andrew Kelley
2021-02-23 18:33:13 -07:00
parent 988f1c6a6f
commit 4420fe97be
2 changed files with 15 additions and 3 deletions

View File

@@ -1040,7 +1040,7 @@ fn renderWhile(gpa: *Allocator, ais: *Ais, tree: ast.Tree, while_node: ast.full.
if (token_tags[ident + 1] == .comma) {
try renderToken(ais, tree, ident + 1, .space); // ,
try renderToken(ais, tree, ident + 2, .none); // index
break :blk payload_token + 3;
break :blk ident + 3;
} else {
break :blk ident + 1;
}
@@ -1102,7 +1102,7 @@ fn renderWhile(gpa: *Allocator, ais: *Ais, tree: ast.Tree, while_node: ast.full.
if (token_tags[ident + 1] == .comma) {
try renderToken(ais, tree, ident + 1, .space); // ,
try renderToken(ais, tree, ident + 2, .none); // index
break :blk payload_token + 3;
break :blk ident + 3;
} else {
break :blk ident + 1;
}
@@ -1177,7 +1177,7 @@ fn renderWhile(gpa: *Allocator, ais: *Ais, tree: ast.Tree, while_node: ast.full.
if (token_tags[ident + 1] == .comma) {
try renderToken(ais, tree, ident + 1, .space); // ,
try renderToken(ais, tree, ident + 2, .none); // index
break :blk payload_token + 3;
break :blk ident + 3;
} else {
break :blk ident + 1;
}