pub fn parsenewline(p: *Parser) Error!bool p: *ParserMaxDepth3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709 pub fn parsenewline(p: *Parser) Error!bool {
const def_index = @backingInt(Def.defnewline);
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: {
const pos_1 = p.i;
const match_1 = blk_3: {
const pos_3 = p.i;
if (blk_4: {
if (std.mem.startsWith(u8, p.source[p.i..], "\n")) {
p.i += 1;
break :blk_4 true;
}
break :blk_4 false;
}) break :blk_3 true;
p.i = pos_3;
if (blk_4: {
if (std.mem.startsWith(u8, p.source[p.i..], "\r\n")) {
p.i += 2;
break :blk_4 true;
}
break :blk_4 false;
}) break :blk_3 true;
p.i = pos_3;
if (try p.parseeof()) break :blk_3 true;
p.i = pos_3;
break :blk_3 false;
};
p.i = pos_1;
break :blk_1 match_1;
}) break :blk_0 true;
p.i = pos_0;
break :blk_0 false;
};
}