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.

internalParseArray

static.internalParseArray
fn internalParseArray(
    comptime T: type,
    comptime Child: type,
    allocator: Allocator,
    source: anytype,
    options: ParseOptions,
) !T

File

lib/std/json/static.zig:526

Code

fn internalParseArray(
    comptime T: type,
    comptime Child: type,
    allocator: Allocator,
    source: anytype,
    options: ParseOptions,
) !T {
    assert(.array_begin == try source.next());

    var r: T = undefined;
    for (&r) |*elem| {
        elem.* = try innerParse(Child, allocator, source, options);
    }

    if (.array_end != try source.next()) return error.UnexpectedToken;

    return r;
}