mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Improve readability of the parser code
This commit is contained in:
parent
00a0125372
commit
2a41b2cd94
10 changed files with 38 additions and 63 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue