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.

walkFnProto

Walk.walkFnProto
fn walkFnProto(w: *Walk, fn_proto: Ast.full.FnProto) Error!void

File

Code

fn walkFnProto(w: *Walk, fn_proto: Ast.full.FnProto) Error!void {
    const ast = w.ast;

    {
        var it = fn_proto.iterate(ast);
        while (it.next()) |param| {
            if (param.type_expr) |type_expr| {
                try walkExpression(w, type_expr);
            }
        }
    }

    if (fn_proto.ast.align_expr.unwrap()) |align_expr| {
        try walkExpression(w, align_expr);
    }

    if (fn_proto.ast.addrspace_expr.unwrap()) |addrspace_expr| {
        try walkExpression(w, addrspace_expr);
    }

    if (fn_proto.ast.section_expr.unwrap()) |section_expr| {
        try walkExpression(w, section_expr);
    }

    if (fn_proto.ast.callconv_expr.unwrap()) |callconv_expr| {
        try walkExpression(w, callconv_expr);
    }

    const return_type = fn_proto.ast.return_type.unwrap().?;
    try walkExpression(w, return_type);
}