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 standard library.
std › zig › parser_generated_oracle › Parser › parsedigit Public Function parsedigit Doc Source Public Function std.zig.parser_generated_oracle.Parser.parsedigit
pub fn parsedigit (p : *Parser ) Error !bool Params Errors File zig/parser_generated_oracle.zig: 3881
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906 pub fn parsedigit (p : *Parser ) Error !bool {
const def_index = @backingInt (Def .defdigit );
if (p .depths [def_index ] > max_depth ) return error .MaxDepth ;
p .depths [def_index ] += 1 ;
defer p .depths [def_index ] -= 1 ;
return blk_0 : {
const pos_0 = p .i ;
if ((p .i < p .source .len and switch (p .source [p .i ]) {
'_' ...'_' ,
'0' ...'9' ,
'A' ...'D' ,
'F' ...'O' ,
'Q' ...'Z' ,
'a' ...'d' ,
'f' ...'o' ,
'q' ...'z' ,
=> blk_1 : {
p .i += 1 ;
break :blk_1 true ;
},
else => false ,
})) break :blk_0 true ;
p .i = pos_0 ;
break :blk_0 false ;
};
}