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:
Marijn Suijten 2020-11-17 20:02:46 +01:00
parent cc081b7e1c
commit 42da26e959
15 changed files with 72 additions and 5 deletions

View file

@ -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);
}