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 library itself.
fnisOneLineErrorSetDecl(
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.
returntree.tokenTag(rbrace - 1) != .commaand
!hasDocComment(tree, lbrace + 1, rbrace) and
!hasComment(tree, lbrace, rbrace);
}