Really start from scratch.
This commit is contained in:
@@ -26,7 +26,6 @@ use nom::multi::many_till;
|
||||
use nom::sequence::tuple;
|
||||
use nom::IResult;
|
||||
|
||||
use super::nom_context::TestContext;
|
||||
use super::parser_with_context::parser_with_context;
|
||||
use super::text_element_parser::paragraph;
|
||||
|
||||
@@ -137,11 +136,11 @@ pub fn paragraph_end(input: &str) -> Res<&str, &str> {
|
||||
}
|
||||
|
||||
pub fn document(input: &str) -> Res<&str, Vec<(Vec<TextElement>, &str)>> {
|
||||
let initial_context = TestContext::new();
|
||||
let paragraph_context = initial_context;
|
||||
// let initial_context = TestContext::new();
|
||||
// let paragraph_context = initial_context;
|
||||
// let paragraph_context =
|
||||
// initial_context.with_additional_fail_matcher(Rc::new(RefCell::new(paragraph_end)));
|
||||
// let initial_context = NomContext::new(Rc::new(RefCell::new(paragraph_end)));
|
||||
let ret = many1(parser_with_context!(paragraph)(¶graph_context))(input);
|
||||
let ret = many1(parser_with_context!(paragraph)(10))(input);
|
||||
ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user