From 76b23254865f746b6c11450b9282a78b91ff3f54 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 18 Dec 2022 03:29:01 -0500 Subject: [PATCH] Start the plain list module. --- src/parser/mod.rs | 1 + src/parser/plain_list.rs | 8 ++++++++ src/parser/token.rs | 11 +++++++++++ 3 files changed, 20 insertions(+) create mode 100644 src/parser/plain_list.rs diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 7e0fd1d..2f5130b 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -7,6 +7,7 @@ mod list; mod paragraph; mod parser_context; mod parser_with_context; +mod plain_list; mod text; mod token; mod util; diff --git a/src/parser/plain_list.rs b/src/parser/plain_list.rs new file mode 100644 index 0000000..86f2585 --- /dev/null +++ b/src/parser/plain_list.rs @@ -0,0 +1,8 @@ +use super::error::Res; +use super::token::PlainList; +use super::Context; + +pub fn plain_list<'r, 's>(context: Context<'r, 's>, i: &'s str) -> Res<&'s str, PlainList<'s>> { + // todo + todo!() +} diff --git a/src/parser/token.rs b/src/parser/token.rs index 65d4bc0..e695b23 100644 --- a/src/parser/token.rs +++ b/src/parser/token.rs @@ -95,3 +95,14 @@ impl<'a> Source<'a> for Paragraph<'a> { self.source } } + +#[derive(Debug)] +pub struct PlainList<'a> { + pub source: &'a str, +} + +impl<'a> Source<'a> for PlainList<'a> { + fn get_source(&'a self) -> &'a str { + self.source + } +}