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.

termToInteresting

reduce.termToInteresting
fn termToInteresting(term: std.process.Child.Term) Interestingness

File

lib/compiler/reduce.zig:283

Code

fn termToInteresting(term: std.process.Child.Term) Interestingness {
    return switch (term) {
        .exited => |code| switch (code) {
            0 => .interesting,
            1 => .unknown,
            else => .boring,
        },
        .signal => |sig| {
            std.debug.print("interestingness check terminated with signal {t}\n", .{sig});
            return .boring;
        },
        .stopped => |sig| {
            std.debug.print("interestingness check stopped with signal {t}\n", .{sig});
            return .boring;
        },
        .unknown => {
            std.debug.print("interestingness check aborted unexpectedly\n", .{});
            return .boring;
        },
    };
}