pub fn parseBoolAndExpr(p: *Parser) Error!bool p: *ParserMaxDepth1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029 pub fn parseBoolAndExpr(p: *Parser) Error!bool {
const def_index = @backingInt(Def.defBoolAndExpr);
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.parseCompareExpr() and blk_1: {
var i_1: usize = 0;
while (blk_3: {
const pos_3 = p.i;
if (try p.parseAndOp() and try p.parseCompareExpr()) break :blk_3 true;
p.i = pos_3;
break :blk_3 false;
}) {
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.parseAndOp();
p.i = pos_1;
break :blk_1 !match_1;
}) break :blk_0 true;
p.i = pos_0;
break :blk_0 false;
};
}