Omg lifetimes errors.

This commit is contained in:
Tom Alexander 2022-12-03 21:40:29 -05:00
parent dff528da32
commit 83881e55b5
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 7 additions and 2 deletions

View File

@ -19,6 +19,11 @@ impl<'r> ContextTree<'r> {
let new_list = self.tree.push_front(data);
ContextTree { tree: new_list }
}
pub fn check_fail_matcher<'s>(&'r self, i: &'s str) -> IResult<&'s str, &'s str, VerboseError<&'s str>> {
// todo
todo!()
}
}
#[derive(Debug, Clone)]
@ -43,7 +48,7 @@ pub enum ChainBehavior<'r> {
IgnoreParent(Option<&'r Matcher>),
}
impl std::fmt::Debug for ChainBehavior {
impl<'r> std::fmt::Debug for ChainBehavior<'r> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ChainBehavior");
// match self {

View File

@ -151,7 +151,7 @@ fn recognize_link_end(input: &str) -> Res<&str, &str> {
recognize(link_end)(input)
}
fn flat_link<'s, 'r, C>(context: Context<'r>, i: &'s str) -> Res<&'s str, Link<'s>> {
fn flat_link<'s, 'r>(context: Context<'r>, i: &'s str) -> Res<&'s str, Link<'s>> {
let new_context =
context.with_additional_node(ContextElement::FailMatcherNode(FailMatcherNode {
fail_matcher: ChainBehavior::AndParent(Some(&recognize_link_end)),