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.

saveSourceCursor

Get the current source cursor, to be restored later with restoreSourceCursor. This is useful when analyzing source code out-of-order.

AstGen.saveSourceCursor
fn saveSourceCursor(astgen: *const AstGen) SourceCursor

File

lib/std/zig/AstGen.zig:12843

Code

fn saveSourceCursor(astgen: *const AstGen) SourceCursor {
    return .{
        .offset = astgen.source_offset,
        .line = astgen.source_line,
        .column = astgen.source_column,
    };
}