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

parsePtrMods

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

Params

Errors

MaxDepth

File

zig/parser_generated_oracle.zig:2513
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
    pub fn parsePtrMods(p: *Parser) Error!bool {
        const def_index = @backingInt(Def.defPtrMods);
        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 (try p.parsePtrMod()) {
                    if (i_1 > max_depth) return error.MaxDepth;
                    i_1 += 1;
                }
                break :blk_1 true;
            } and blk_1: {
                const pos_1 = p.i;
                const match_1 = try p.parseKEYWORD_addrspace();
                p.i = pos_1;
                break :blk_1 !match_1;
            } and (try p.parseByteAlign() or true) and blk_1: {
                var i_1: usize = 0;
                while (try p.parsePtrMod()) {
                    if (i_1 > max_depth) return error.MaxDepth;
                    i_1 += 1;
                }
                break :blk_1 true;
            } and (try p.parseAddrSpace() or true) and blk_1: {
                var i_1: usize = 0;
                while (try p.parsePtrMod()) {
                    if (i_1 > max_depth) return error.MaxDepth;
                    i_1 += 1;
                }
                break :blk_1 true;
            }) break :blk_0 true;
            p.i = pos_0;
            if (blk_1: {
                var i_1: usize = 0;
                while (try p.parsePtrMod()) {
                    if (i_1 > max_depth) return error.MaxDepth;
                    i_1 += 1;
                }
                break :blk_1 true;
            } and blk_1: {
                const pos_1 = p.i;
                const match_1 = try p.parseKEYWORD_align();
                p.i = pos_1;
                break :blk_1 !match_1;
            } and (try p.parseAddrSpace() or true) and blk_1: {
                var i_1: usize = 0;
                while (try p.parsePtrMod()) {
                    if (i_1 > max_depth) return error.MaxDepth;
                    i_1 += 1;
                }
                break :blk_1 true;
            } and (try p.parseByteAlign() or true) and blk_1: {
                var i_1: usize = 0;
                while (try p.parsePtrMod()) {
                    if (i_1 > max_depth) return error.MaxDepth;
                    i_1 += 1;
                }
                break :blk_1 true;
            }) break :blk_0 true;
            p.i = pos_0;
            break :blk_0 false;
        };
    }