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.
fnparseLoopStatement(p: *Parse) !?Node.Index {
constinline_token = p.eatToken(.keyword_inline);
if (tryp.parseForStatement()) |for_statement| returnfor_statement;
if (tryp.parseWhileStatement()) |while_statement| returnwhile_statement;
if (inline_token == null) returnnull;
// If we've seen "inline", there should have been a "for" or "while"returnp.fail(.expected_inlinable);
}