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

parseSinglePtrMods

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

Params

Errors

MaxDepth

File

zig/parser_generated_oracle.zig:2579
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
    pub fn parseSinglePtrMods(p: *Parser) Error!bool {
        const def_index = @backingInt(Def.defSinglePtrMods);
        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.parseBitAlign() 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.parseBitAlign() 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;
        };
    }