I think I need a box.

This commit is contained in:
Tom Alexander 2022-10-14 20:50:00 -04:00
parent add717071c
commit 9e3ea29634
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -19,4 +19,14 @@ impl<'a> NomContext<'a> {
can_match_link: true,
}
}
pub fn with_additional_fail_matcher<'o, 'c: 'a + 'o>(&self, other: &'o mut dyn FnMut(&str) -> IResult<&str, &str, VerboseError<&str>>) -> NomContext<'c> {
let new_matcher = alt((&self.fail_matcher, other));
NomContext {
fail_matcher: new_matcher,
can_match_bold: self.can_match_bold,
can_match_link: self.can_match_link
}
todo!()
}
}