Add comment of what I need to do.

This commit is contained in:
Tom Alexander 2022-12-10 21:10:37 -05:00
parent 1efe2efc41
commit 5899bde66e
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -56,12 +56,15 @@ where
T: for<'a> Fn(Context<'a>, I) -> IResult<I, F, E> + 'r,
{
move |mut i: I| {
let mut ret = Vec::new();
let mut current_context = context.clone();
loop {
let len = i.input_len();
match till_matcher(&current_context, i.clone()) {
Ok((remaining, finish)) => return Ok((remaining, (ret, finish))),
Ok((remaining, finish)) => {
let mut ret = Vec::new();
// TODO build a vec of the elements by popping off the newest elements of the context
return Ok((remaining, (ret, finish)));
}
Err(nom::Err::Error(_)) => {
match many_matcher(&current_context, i.clone()) {
Err(nom::Err::Error(err)) => {
@ -77,7 +80,6 @@ where
)));
}
ret.push(many_elem);
current_context = current_context.with_additional_node(
ContextElement::PreviousElementNode(PreviousElementNode {
element: many_elem.into(),