mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
parser,syntax: Add separate parser for stmt with optional semicolon
Adjusting `grammar::fragments::stmt` to Optional or Yes will break original functionality and tests.
This commit is contained in:
parent
cc081b7e1c
commit
42da26e959
15 changed files with 72 additions and 5 deletions
|
@ -66,6 +66,10 @@ pub(crate) mod fragments {
|
|||
expressions::stmt(p, expressions::StmtWithSemi::No)
|
||||
}
|
||||
|
||||
pub(crate) fn stmt_optional_semi(p: &mut Parser) {
|
||||
expressions::stmt(p, expressions::StmtWithSemi::Optional)
|
||||
}
|
||||
|
||||
pub(crate) fn opt_visibility(p: &mut Parser) {
|
||||
let _ = super::opt_visibility(p);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue