Switching to a new context variable.
This commit is contained in:
		
							parent
							
								
									c568920da8
								
							
						
					
					
						commit
						96aca6b537
					
				| @ -54,12 +54,13 @@ where | ||||
| { | ||||
|     move |mut i: I| { | ||||
|         let mut ret = Vec::new(); | ||||
|         let current_context = context; | ||||
|         loop { | ||||
|             let len = i.input_len(); | ||||
|             match till_matcher(context, i.clone()) { | ||||
|             match till_matcher(current_context, i.clone()) { | ||||
|                 Ok((remaining, finish)) => return Ok((remaining, (ret, finish))), | ||||
|                 Err(nom::Err::Error(_)) => { | ||||
|                     match many_matcher(context, i.clone()) { | ||||
|                     match many_matcher(current_context, i.clone()) { | ||||
|                         Err(nom::Err::Error(err)) => { | ||||
|                             return Err(nom::Err::Error(E::append(i, ErrorKind::ManyTill, err))) | ||||
|                         } | ||||
| @ -74,6 +75,7 @@ where | ||||
|                             } | ||||
| 
 | ||||
|                             ret.push(many_elem); | ||||
|                             // TODO: make new context
 | ||||
|                             i = remaining; | ||||
|                         } | ||||
|                     } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander