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.

parseCBitOrExpr

MacroTranslator.parseCBitOrExpr
fn parseCBitOrExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode

File

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

Code

fn parseCBitOrExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
    var node = try mt.parseCBitXorExpr(scope);
    while (mt.eat(.pipe)) {
        const lhs = try mt.macroIntFromBool(node);
        const rhs = try mt.macroIntFromBool(try mt.parseCBitXorExpr(scope));
        node = try ZigTag.bit_or.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
    }
    return node;
}