parser: restore some fn visibility for rustfmt

This commit is contained in:
Caleb Cartwright 2020-08-30 13:04:36 -05:00
parent 85fbf49ce0
commit 883b1e7592
2 changed files with 4 additions and 2 deletions

View file

@ -21,7 +21,8 @@ use std::mem;
impl<'a> Parser<'a> {
/// Parses a statement. This stops just before trailing semicolons on everything but items.
/// e.g., a `StmtKind::Semi` parses to a `StmtKind::Expr`, leaving the trailing `;` unconsumed.
pub(super) fn parse_stmt(&mut self) -> PResult<'a, Option<Stmt>> {
// Public for rustfmt usage.
pub fn parse_stmt(&mut self) -> PResult<'a, Option<Stmt>> {
Ok(self.parse_stmt_without_recovery().unwrap_or_else(|mut e| {
e.emit();
self.recover_stmt_(SemiColonMode::Break, BlockMode::Ignore);