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.

logBadSourceInner

parser_fuzz.logBadSourceInner
fn logBadSourceInner(source: []const u8, t: std.Io.Terminal, ast: std.zig.Ast) std.Io.Writer.Error!void

File

lib/std/zig/parser_fuzz.zig:188

Code

fn logBadSourceInner(source: []const u8, t: std.Io.Terminal, ast: std.zig.Ast) std.Io.Writer.Error!void {
    @disableInstrumentation();
    try logSourceInner(source, t);
    const w = t.writer;

    try w.writeAll("=== Parse Errors ===\n");
    for (ast.errors) |err| {
        const loc = ast.tokenLocation(0, err.token);
        try w.print("{}:{}: ", .{ loc.line + 1, loc.column + 1 });
        try ast.renderError(err, w);
        try w.writeByte('\n');
    }
}