-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.zig fmt
Milestone
Description
zig fmt currently allows either of the following:
pub fn main() void {
const zoom_node = if (focused_node == layout_first) while (it.next()) |node| {
if (!node.view.pending.float and !node.view.pending.fullscreen) break node;
} else null else focused_node;
}pub fn main() void {
const zoom_node = if (focused_node == layout_first) while (it.next()) |node| {
if (!node.view.pending.float and !node.view.pending.fullscreen) break node;
} else null else
focused_node;
}Ideally, I think that it should allow something like this:
pub fn main() void {
const zoom_node = if (focused_node == layout_first)
while (it.next()) |node| {
if (!node.view.pending.float and !node.view.pending.fullscreen) break node;
} else null
else
focused_node;
}This can be worked around by using a labeled block for the first arm of the if statement, but labels are quite verbose.
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.zig fmt