Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Private Function

isOneLineErrorSetDecl

Private Function
std.zig.Ast.Render.isOneLineErrorSetDecl
fn isOneLineErrorSetDecl(
    tree: Ast,
    lbrace: Ast.TokenIndex,
    rbrace: Ast.TokenIndex,
) bool

Params

  • tree: Ast
  • lbrace: Ast.TokenIndex
  • rbrace: Ast.TokenIndex

File

zig/Ast/Render.zig:2298
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
fn isOneLineErrorSetDecl(
    tree: Ast,
    lbrace: Ast.TokenIndex,
    rbrace: Ast.TokenIndex,
) bool {
    // If there is a trailing comma, comment, or document comment, then render each
    // item on its own line.
    return tree.tokenTag(rbrace - 1) != .comma and
        !hasDocComment(tree, lbrace + 1, rbrace) and
        !hasComment(tree, lbrace, rbrace);
}