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

parsePrimaryExpr

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

Params

Errors

MaxDepth

File

zig/parser_generated_oracle.zig:1192
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
    pub fn parsePrimaryExpr(p: *Parser) Error!bool {
        const def_index = @backingInt(Def.defPrimaryExpr);
        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.parseAsmExpr()) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseIfExpr()) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseKEYWORD_break() and (try p.parseBreakLabel() or true) and blk_2: {
                const pos_2 = p.i;
                if (try p.parseExpr()) break :blk_2 true;
                p.i = pos_2;
                if (blk_3: {
                    const pos_3 = p.i;
                    const match_3 = try p.parseExprPrefix();
                    p.i = pos_3;
                    break :blk_3 !match_3;
                }) break :blk_2 true;
                p.i = pos_2;
                break :blk_2 false;
            }) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseKEYWORD_comptime() and try p.parseExpr()) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseKEYWORD_nosuspend() and try p.parseExpr()) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseKEYWORD_continue() and (try p.parseBreakLabel() or true) and blk_2: {
                const pos_2 = p.i;
                if (try p.parseExpr()) break :blk_2 true;
                p.i = pos_2;
                if (blk_3: {
                    const pos_3 = p.i;
                    const match_3 = try p.parseExprPrefix();
                    p.i = pos_3;
                    break :blk_3 !match_3;
                }) break :blk_2 true;
                p.i = pos_2;
                break :blk_2 false;
            }) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseKEYWORD_resume() and try p.parseExpr()) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseKEYWORD_return() and blk_2: {
                const pos_2 = p.i;
                if (try p.parseExpr()) break :blk_2 true;
                p.i = pos_2;
                if (blk_3: {
                    const pos_3 = p.i;
                    const match_3 = try p.parseExprPrefix();
                    p.i = pos_3;
                    break :blk_3 !match_3;
                }) break :blk_2 true;
                p.i = pos_2;
                break :blk_2 false;
            }) break :blk_0 true;
            p.i = pos_0;
            if ((try p.parseBlockLabel() or true) and try p.parseLoopExpr()) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseBlock()) break :blk_0 true;
            p.i = pos_0;
            if (try p.parseCurlySuffixExpr()) break :blk_0 true;
            p.i = pos_0;
            break :blk_0 false;
        };
    }