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

parseIDENTIFIER

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

Params

Errors

MaxDepth

File

zig/parser_generated_oracle.zig:4093
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
    pub fn parseIDENTIFIER(p: *Parser) Error!bool {
        const def_index = @backingInt(Def.defIDENTIFIER);
        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 (try p.parseskip() and blk_1: {
                const pos_1 = p.i;
                const match_1 = try p.parsekeyword();
                p.i = pos_1;
                break :blk_1 !match_1;
            } and (p.i < p.source.len and switch (p.source[p.i]) {
                'A'...'Z',
                'a'...'z',
                '_'...'_',
                => blk_1: {
                    p.i += 1;
                    break :blk_1 true;
                },
                else => false,
            }) and blk_1: {
                var i_1: usize = 0;
                while ((p.i < p.source.len and switch (p.source[p.i]) {
                    'A'...'Z',
                    'a'...'z',
                    '0'...'9',
                    '_'...'_',
                    => 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;
            }) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseskip() and blk_1: {
                if (std.mem.startsWith(u8, p.source[p.i..], "@")) {
                    p.i += 1;
                    break :blk_1 true;
                }
                break :blk_1 false;
            } and try p.parsestring()) break :blk_0 true;
            p.i = pos_0;
            break :blk_0 false;
        };
    }