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.

type_fn_members

main.type_fn_members
export fn type_fn_members(parent: Decl.Index, include_private: bool) Slice(Decl.Index)

File

lib/docs/wasm/main.zig:912

Code

export fn type_fn_members(parent: Decl.Index, include_private: bool) Slice(Decl.Index) {
    const decl = parent.get();

    // If the type function returns another type function, get the members of that function
    if (decl.get_type_fn_return_type_fn()) |function_decl| {
        return namespace_members(function_decl, include_private);
    }

    return namespace_members(parent, include_private);
}