Add comment of what I need to do.
This commit is contained in:
parent
1efe2efc41
commit
5899bde66e
@ -56,12 +56,15 @@ where
|
|||||||
T: for<'a> Fn(Context<'a>, I) -> IResult<I, F, E> + 'r,
|
T: for<'a> Fn(Context<'a>, I) -> IResult<I, F, E> + 'r,
|
||||||
{
|
{
|
||||||
move |mut i: I| {
|
move |mut i: I| {
|
||||||
let mut ret = Vec::new();
|
|
||||||
let mut current_context = context.clone();
|
let mut current_context = context.clone();
|
||||||
loop {
|
loop {
|
||||||
let len = i.input_len();
|
let len = i.input_len();
|
||||||
match till_matcher(¤t_context, i.clone()) {
|
match till_matcher(¤t_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(_)) => {
|
Err(nom::Err::Error(_)) => {
|
||||||
match many_matcher(¤t_context, i.clone()) {
|
match many_matcher(¤t_context, i.clone()) {
|
||||||
Err(nom::Err::Error(err)) => {
|
Err(nom::Err::Error(err)) => {
|
||||||
@ -77,7 +80,6 @@ where
|
|||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.push(many_elem);
|
|
||||||
current_context = current_context.with_additional_node(
|
current_context = current_context.with_additional_node(
|
||||||
ContextElement::PreviousElementNode(PreviousElementNode {
|
ContextElement::PreviousElementNode(PreviousElementNode {
|
||||||
element: many_elem.into(),
|
element: many_elem.into(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user