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.

find_file_root

Looks up the root struct decl corresponding to a file by path. Uses input_string.

main.find_file_root
export fn find_file_root() Decl.Index

File

lib/docs/wasm/main.zig:856

Code

export fn find_file_root() Decl.Index {
    const file: Walk.File.Index = @fromBackingInt(@intCast(Walk.files.getIndex(input_string.items) orelse return .none));
    return file.findRootDecl();
}