Lifetime issue.

This commit is contained in:
Tom Alexander
2022-10-15 00:01:37 -04:00
parent 8a6868f299
commit 6b93e1c007
2 changed files with 45 additions and 16 deletions

View File

@@ -1,3 +1,6 @@
use std::cell::RefCell;
use std::rc::Rc;
/*
hypothetical link:
@@ -133,7 +136,7 @@ pub fn paragraph_end(input: &str) -> Res<&str, &str> {
}
pub fn document(input: &str) -> Res<&str, Vec<(Vec<TextElement>, &str)>> {
let initial_context = NomContext::new(Box::new(paragraph_end));
let initial_context = NomContext::new(Rc::new(RefCell::new(paragraph_end)));
todo!()
// many1(parser_with_context!(paragraph)(initial_context))(input)
}