This commit is contained in:
PoiScript 2019-01-04 16:53:20 +08:00
parent 2fef529f57
commit a85efe2056
22 changed files with 1776 additions and 7 deletions

18
src/elements/mod.rs Normal file
View file

@ -0,0 +1,18 @@
pub mod fn_def;
pub mod keyword;
pub mod rule;
pub use self::fn_def::FnDef;
pub use self::keyword::Keyword;
pub use self::rule::Rule;
pub enum Element<'a> {
Paragraph(&'a str),
}
impl<'a> Element<'a> {
pub fn find_elem(src: &'a str) -> (Element<'a>, usize) {
// TODO
(Element::Paragraph(src), src.len())
}
}