pub fn parsechar_char(p: *Parser) Error!bool p: *ParserMaxDepth3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468 pub fn parsechar_char(p: *Parser) Error!bool {
const def_index = @backingInt(Def.defchar_char);
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: {
if (std.mem.startsWith(u8, p.source[p.i..], "\\\\")) {
p.i += 2;
break :blk_1 true;
}
break :blk_1 false;
}) break :blk_0 true;
p.i = pos_0;
if (blk_1: {
if (std.mem.startsWith(u8, p.source[p.i..], "\\'")) {
p.i += 2;
break :blk_1 true;
}
break :blk_1 false;
}) break :blk_0 true;
p.i = pos_0;
if (blk_1: {
const pos_1 = p.i;
const match_1 = (p.i < p.source.len and switch (p.source[p.i]) {
'\''...'\'',
=> blk_2: {
p.i += 1;
break :blk_2 true;
},
else => false,
});
p.i = pos_1;
break :blk_1 !match_1;
} and try p.parsenon_control_utf8()) break :blk_0 true;
p.i = pos_0;
break :blk_0 false;
};
}