mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Support a blank expression before a semicolon
This commit is contained in:
parent
057c95d3dd
commit
dc1c64f5b9
1 changed files with 6 additions and 0 deletions
|
@ -42,6 +42,11 @@ pub(crate) fn block(p: &mut Parser) {
|
||||||
}
|
}
|
||||||
let m = p.start();
|
let m = p.start();
|
||||||
p.bump();
|
p.bump();
|
||||||
|
// test nocontentexpr
|
||||||
|
// fn foo(){
|
||||||
|
// ;;;some_expr();;;;{;;;};;;;Ok(())
|
||||||
|
// }
|
||||||
|
while p.eat(SEMI) {}
|
||||||
while !p.at(EOF) && !p.at(R_CURLY) {
|
while !p.at(EOF) && !p.at(R_CURLY) {
|
||||||
match p.current() {
|
match p.current() {
|
||||||
LET_KW => let_stmt(p),
|
LET_KW => let_stmt(p),
|
||||||
|
@ -89,6 +94,7 @@ pub(crate) fn block(p: &mut Parser) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
while p.eat(SEMI) {}
|
||||||
}
|
}
|
||||||
p.expect(R_CURLY);
|
p.expect(R_CURLY);
|
||||||
m.complete(p, BLOCK);
|
m.complete(p, BLOCK);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue