mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Auto merge of #16786 - pksunkara:improve-readability, r=lnicola
internal: Improve readability of the parser code The code is basically equivalent to the previous version, but it improves the readability by making it much more simpler and concise.
This commit is contained in:
commit
2b7b44bf27
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