Start of attempt to return tokens.
This commit is contained in:
parent
a88117f731
commit
ea63793b36
@ -47,7 +47,7 @@ fn context_many_till<'r, 'x, I, O, E, F, M, T>(
|
||||
context: Context<'r>,
|
||||
mut many_matcher: M,
|
||||
mut till_matcher: T,
|
||||
) -> impl FnMut(I) -> IResult<I, (Vec<O>, F), E> + 'r
|
||||
) -> impl FnMut(I) -> IResult<I, (Vec<Token<'x>>, F), E> + 'r
|
||||
where
|
||||
O: Into<Token<'x>>,
|
||||
I: Clone + InputLength,
|
||||
@ -71,11 +71,7 @@ where
|
||||
ContextElement::PreviousElementNode(PreviousElementNode {
|
||||
element: token,
|
||||
}) => {
|
||||
match token {
|
||||
Token::TextElement(text_element) => {
|
||||
ret.push(text_element);
|
||||
}
|
||||
};
|
||||
ret.push(token);
|
||||
}
|
||||
};
|
||||
|
||||
@ -138,7 +134,9 @@ pub fn paragraph<'s, 'r>(
|
||||
fail_matcher: ChainBehavior::AndParent(Some(¶graph_end)),
|
||||
}));
|
||||
let ret = context_many_till(¶graph_context, flat_text_element, context_paragraph_end)(i);
|
||||
ret
|
||||
// TODO: FIX THIS
|
||||
// ret
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn flat_text_element<'s, 'r>(context: Context<'r>, i: &'s str) -> Res<&'s str, TextElement<'s>> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user