Add the code structure for diary sexp.

This commit is contained in:
Tom Alexander
2023-04-21 20:22:31 -04:00
parent 48b5a9d67a
commit db78faa36f
6 changed files with 52 additions and 0 deletions

View File

@@ -64,6 +64,11 @@ pub struct Clock<'s> {
pub source: &'s str,
}
#[derive(Debug)]
pub struct DiarySexp<'s> {
pub source: &'s str,
}
impl<'s> Paragraph<'s> {
pub fn of_text(input: &'s str) -> Self {
let mut objects = Vec::with_capacity(1);
@@ -124,3 +129,9 @@ impl<'s> Source<'s> for Clock<'s> {
self.source
}
}
impl<'s> Source<'s> for DiarySexp<'s> {
fn get_source(&'s self) -> &'s str {
self.source
}
}