diff --git a/src/parser/new_context.rs b/src/parser/new_context.rs index 34f620d9..9e563dcb 100644 --- a/src/parser/new_context.rs +++ b/src/parser/new_context.rs @@ -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 { diff --git a/src/parser/text_element_parser.rs b/src/parser/text_element_parser.rs index f80b9bfb..af55966c 100644 --- a/src/parser/text_element_parser.rs +++ b/src/parser/text_element_parser.rs @@ -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)),