mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Don't get stuck in tuple exprs
This commit is contained in:
parent
a0a347eac9
commit
febbc9acdd
4 changed files with 484 additions and 96 deletions
|
@ -108,6 +108,10 @@ fn tuple_expr(p: &mut Parser) -> CompletedMarker {
|
|||
let mut saw_expr = false;
|
||||
while !p.at(EOF) && !p.at(R_PAREN) {
|
||||
saw_expr = true;
|
||||
if !EXPR_FIRST.contains(p.current()) {
|
||||
p.error("expected expression");
|
||||
break;
|
||||
}
|
||||
expr(p);
|
||||
if !p.at(R_PAREN) {
|
||||
saw_comma = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue