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.

macroIntFromBool

MacroTranslator.macroIntFromBool
fn macroIntFromBool(mt: *MacroTranslator, node: ZigNode) !ZigNode

File

lib/compiler/translate-c/MacroTranslator.zig:717

Code

fn macroIntFromBool(mt: *MacroTranslator, node: ZigNode) !ZigNode {
    if (!node.isBoolRes()) return node;

    return ZigTag.int_from_bool.create(mt.t.arena, node);
}