Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Public Function

parseskip_require_newline

Public Function
std.zig.parser_generated_oracle.Parser.parseskip_require_newline
pub fn parseskip_require_newline(p: *Parser) Error!bool

Params

Errors

MaxDepth

File

zig/parser_generated_oracle.zig:3746
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
    pub fn parseskip_require_newline(p: *Parser) Error!bool {
        const def_index = @backingInt(Def.defskip_require_newline);
        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 (blk_1: {
                var i_1: usize = 0;
                while ((p.i < p.source.len and switch (p.source[p.i]) {
                    ' '...' ',
                    '\t'...'\t',
                    '\r'...'\r',
                    => blk_2: {
                        p.i += 1;
                        break :blk_2 true;
                    },
                    else => false,
                })) {
                    if (i_1 > max_depth) return error.MaxDepth;
                    i_1 += 1;
                }
                break :blk_1 true;
            } and blk_2: {
                const pos_2 = p.i;
                if ((p.i < p.source.len and switch (p.source[p.i]) {
                    '\n'...'\n',
                    => blk_3: {
                        p.i += 1;
                        break :blk_3 true;
                    },
                    else => false,
                })) break :blk_2 true;
                p.i = pos_2;
                if (try p.parseline_comment()) break :blk_2 true;
                p.i = pos_2;
                break :blk_2 false;
            } and try p.parseskip()) break :blk_0 true;
            p.i = pos_0;
            break :blk_0 false;
        };
    }