Zig 0.17.0-dev (Split by item)

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.

renderBlank

ConfigHeader.renderBlank
fn renderBlank(
    conf: *const Configuration,
    w: *Writer,
    value_pairs: []const Value.Pair,
    value_map: *const ValueMap,
    include_path: []const u8,
    include_guard_override: ?[]const u8,
) !void

File

lib/compiler/Maker/Step/ConfigHeader.zig:373

Code

fn renderBlank(
    conf: *const Configuration,
    w: *Writer,
    value_pairs: []const Value.Pair,
    value_map: *const ValueMap,
    include_path: []const u8,
    include_guard_override: ?[]const u8,
) !void {
    try w.writeAll(c_generated_line);
    try w.writeAll(os_newline);

    const include_guard_fmt: IncludeGuardFmt = .{
        .include_path = include_path,
        .override = include_guard_override,
    };

    try w.print(
        "#ifndef {[0]f}{[1]s}#define {[0]f}{[1]s}",
        .{ include_guard_fmt, os_newline },
    );

    for (value_map.keys(), value_pairs) |name, pair| try renderValueC(conf, w, os_newline, name, pair.index);

    try w.print("#endif /* {f} */{s}", .{ include_guard_fmt, os_newline });
}