pub fn parseBoolOrExpr(p: *Parser) Error!bool p: *ParserMaxDepth972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000 pub fn parseBoolOrExpr(p: *Parser) Error!bool {
const def_index = @backingInt(Def.defBoolOrExpr);
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.parseBoolAndExpr() and blk_1: {
var i_1: usize = 0;
while (blk_3: {
const pos_3 = p.i;
if (try p.parseOrOp() and try p.parseBoolAndExpr()) 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.parseOrOp();
p.i = pos_1;
break :blk_1 !match_1;
}) break :blk_0 true;
p.i = pos_0;
break :blk_0 false;
};
}