Create structure for timestamps.
This commit is contained in:
@@ -28,6 +28,7 @@ pub enum Object<'s> {
|
||||
StatisticsCookie(StatisticsCookie<'s>),
|
||||
Subscript(Subscript<'s>),
|
||||
Superscript(Superscript<'s>),
|
||||
Timestamp(Timestamp<'s>),
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
@@ -179,6 +180,11 @@ pub struct Superscript<'s> {
|
||||
pub source: &'s str,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct Timestamp<'s> {
|
||||
pub source: &'s str,
|
||||
}
|
||||
|
||||
impl<'s> Source<'s> for Object<'s> {
|
||||
fn get_source(&'s self) -> &'s str {
|
||||
match self {
|
||||
@@ -205,6 +211,7 @@ impl<'s> Source<'s> for Object<'s> {
|
||||
Object::InlineSourceBlock(obj) => obj.source,
|
||||
Object::LineBreak(obj) => obj.source,
|
||||
Object::Target(obj) => obj.source,
|
||||
Object::Timestamp(obj) => obj.source,
|
||||
Object::StatisticsCookie(obj) => obj.source,
|
||||
Object::Subscript(obj) => obj.source,
|
||||
Object::Superscript(obj) => obj.source,
|
||||
@@ -361,3 +368,9 @@ impl<'s> Source<'s> for Superscript<'s> {
|
||||
self.source
|
||||
}
|
||||
}
|
||||
|
||||
impl<'s> Source<'s> for Timestamp<'s> {
|
||||
fn get_source(&'s self) -> &'s str {
|
||||
self.source
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user