Only do parser recovery on retried macro matching

This prevents issues with eager parser recovery during macro matching.
This commit is contained in:
Nilstrieb 2022-11-12 22:12:33 +01:00
parent 6d651a295e
commit b7b67228f9
No known key found for this signature in database
5 changed files with 60 additions and 10 deletions

View file

@ -503,8 +503,8 @@ impl<'a> Parser<'a> {
parser
}
pub fn forbid_recovery(mut self) -> Self {
self.recovery = Recovery::Forbidden;
pub fn recovery(mut self, recovery: Recovery) -> Self {
self.recovery = recovery;
self
}