Improve readability of the parser code

This commit is contained in:
Pavan Kumar Sunkara 2024-03-06 21:09:30 +00:00
parent 00a0125372
commit 2a41b2cd94
10 changed files with 38 additions and 63 deletions

View file

@ -416,14 +416,12 @@ fn delimited(
if !parser(p) {
break;
}
if !p.at(delim) {
if !p.eat(delim) {
if p.at_ts(first_set) {
p.error(format!("expected {:?}", delim));
} else {
break;
}
} else {
p.bump(delim);
}
}
p.expect(ket);