Starting to define document parser.
This commit is contained in:
parent
d98a11059c
commit
6042c44514
@ -1,4 +1,8 @@
|
||||
use crate::parser::parser_context::ContextElement;
|
||||
use crate::parser::parser_context::ContextTree;
|
||||
|
||||
use super::element::Element;
|
||||
use super::error::Res;
|
||||
use super::source::Source;
|
||||
|
||||
#[derive(Debug)]
|
||||
@ -40,3 +44,11 @@ impl<'s> Source<'s> for DocumentElement<'s> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn document(input: &str) -> Res<&str, Document> {
|
||||
let initial_context: ContextTree<'_, '_> = ContextTree::new();
|
||||
let document_context =
|
||||
initial_context.with_additional_node(ContextElement::DocumentRoot(input));
|
||||
|
||||
todo!()
|
||||
}
|
||||
|
@ -17,5 +17,3 @@ mod text;
|
||||
mod token;
|
||||
mod util;
|
||||
type Context<'r, 's> = &'r parser_context::ContextTree<'r, 's>;
|
||||
pub use parser_context::ContextTree;
|
||||
pub use plain_list::item;
|
||||
|
Loading…
x
Reference in New Issue
Block a user