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.
pubconstInlineeSourceLocationIterator = struct {
/// The iterator assumes that all source lines in the slice are associated/// with the same inlinee, and that it is sorted by file, then line number.lines: []*align(1) constpdb.InlineeSourceLine,
pubconstempty: InlineeSourceLocationIterator = .{ .lines = &.{} };
pubfnnext(iter: *InlineeSourceLocationIterator) ?*align(1) constpdb.InlineeSourceLine {
if (iter.lines.len == 0) returnnull;
constline = iter.lines[0];
iter.lines = iter.lines[1..];
// Filter out duplicate entrieswhile (iter.lines.len != 0anditer.lines[0].file_id == line.file_idanditer.lines[0].source_line_num == line.source_line_num)
{
iter.lines = iter.lines[1..];
}
returnline;
}
}