Code structure for latex environment.

This commit is contained in:
Tom Alexander
2023-04-22 16:56:36 -04:00
parent 185f16d2cc
commit 4816a5dfc4
6 changed files with 58 additions and 0 deletions

View File

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