Add the skeletons for the elements.
This commit is contained in:
		
							parent
							
								
									860b601f62
								
							
						
					
					
						commit
						23713a934c
					
				
							
								
								
									
										23
									
								
								src/context/babel_call.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/babel_call.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IBabelCall; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "babel_call")] | ||||
| pub(crate) struct RenderBabelCall {} | ||||
| 
 | ||||
| impl RenderBabelCall { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IBabelCall, | ||||
|     ) -> Result<RenderBabelCall, CustomError> { | ||||
|         Ok(RenderBabelCall {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/center_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/center_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::ICenterBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "center_block")] | ||||
| pub(crate) struct RenderCenterBlock {} | ||||
| 
 | ||||
| impl RenderCenterBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &ICenterBlock, | ||||
|     ) -> Result<RenderCenterBlock, CustomError> { | ||||
|         Ok(RenderCenterBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/clock.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/clock.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IClock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "clock")] | ||||
| pub(crate) struct RenderClock {} | ||||
| 
 | ||||
| impl RenderClock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IClock, | ||||
|     ) -> Result<RenderClock, CustomError> { | ||||
|         Ok(RenderClock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/comment_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/comment_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::ICommentBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "comment_block")] | ||||
| pub(crate) struct RenderCommentBlock {} | ||||
| 
 | ||||
| impl RenderCommentBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &ICommentBlock, | ||||
|     ) -> Result<RenderCommentBlock, CustomError> { | ||||
|         Ok(RenderCommentBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/diary_sexp.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/diary_sexp.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IDiarySexp; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "diary_sexp")] | ||||
| pub(crate) struct RenderDiarySexp {} | ||||
| 
 | ||||
| impl RenderDiarySexp { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IDiarySexp, | ||||
|     ) -> Result<RenderDiarySexp, CustomError> { | ||||
|         Ok(RenderDiarySexp {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/drawer.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/drawer.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IDrawer; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "drawer")] | ||||
| pub(crate) struct RenderDrawer {} | ||||
| 
 | ||||
| impl RenderDrawer { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IDrawer, | ||||
|     ) -> Result<RenderDrawer, CustomError> { | ||||
|         Ok(RenderDrawer {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/dynamic_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/dynamic_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IDynamicBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "dynamic_block")] | ||||
| pub(crate) struct RenderDynamicBlock {} | ||||
| 
 | ||||
| impl RenderDynamicBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IDynamicBlock, | ||||
|     ) -> Result<RenderDynamicBlock, CustomError> { | ||||
|         Ok(RenderDynamicBlock {}) | ||||
|     } | ||||
| } | ||||
| @ -6,16 +6,58 @@ use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IElement; | ||||
| 
 | ||||
| use super::babel_call::RenderBabelCall; | ||||
| use super::center_block::RenderCenterBlock; | ||||
| use super::clock::RenderClock; | ||||
| use super::comment::RenderComment; | ||||
| use super::comment_block::RenderCommentBlock; | ||||
| use super::diary_sexp::RenderDiarySexp; | ||||
| use super::drawer::RenderDrawer; | ||||
| use super::dynamic_block::RenderDynamicBlock; | ||||
| use super::example_block::RenderExampleBlock; | ||||
| use super::export_block::RenderExportBlock; | ||||
| use super::fixed_width_area::RenderFixedWidthArea; | ||||
| use super::footnote_definition::RenderFootnoteDefinition; | ||||
| use super::horizontal_rule::RenderHorizontalRule; | ||||
| use super::keyword::RenderKeyword; | ||||
| use super::latex_environment::RenderLatexEnvironment; | ||||
| use super::paragraph::RenderParagraph; | ||||
| use super::plain_list::RenderPlainList; | ||||
| use super::planning::RenderPlanning; | ||||
| use super::property_drawer::RenderPropertyDrawer; | ||||
| use super::quote_block::RenderQuoteBlock; | ||||
| use super::special_block::RenderSpecialBlock; | ||||
| use super::src_block::RenderSrcBlock; | ||||
| use super::table::RenderTable; | ||||
| use super::verse_block::RenderVerseBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(untagged)] | ||||
| pub(crate) enum RenderElement { | ||||
|     Paragraph(RenderParagraph), | ||||
|     Keyword(RenderKeyword), | ||||
|     PlainList(RenderPlainList), | ||||
|     CenterBlock(RenderCenterBlock), | ||||
|     QuoteBlock(RenderQuoteBlock), | ||||
|     SpecialBlock(RenderSpecialBlock), | ||||
|     DynamicBlock(RenderDynamicBlock), | ||||
|     FootnoteDefinition(RenderFootnoteDefinition), | ||||
|     Comment(RenderComment), | ||||
|     Drawer(RenderDrawer), | ||||
|     PropertyDrawer(RenderPropertyDrawer), | ||||
|     Table(RenderTable), | ||||
|     VerseBlock(RenderVerseBlock), | ||||
|     CommentBlock(RenderCommentBlock), | ||||
|     ExampleBlock(RenderExampleBlock), | ||||
|     ExportBlock(RenderExportBlock), | ||||
|     SrcBlock(RenderSrcBlock), | ||||
|     Clock(RenderClock), | ||||
|     DiarySexp(RenderDiarySexp), | ||||
|     Planning(RenderPlanning), | ||||
|     FixedWidthArea(RenderFixedWidthArea), | ||||
|     HorizontalRule(RenderHorizontalRule), | ||||
|     Keyword(RenderKeyword), | ||||
|     BabelCall(RenderBabelCall), | ||||
|     LatexEnvironment(RenderLatexEnvironment), | ||||
| } | ||||
| 
 | ||||
| impl RenderElement { | ||||
| @ -32,18 +74,117 @@ impl RenderElement { | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::Keyword(inner) => Ok(RenderElement::Keyword(RenderKeyword::new( | ||||
|             IElement::PlainList(inner) => Ok(RenderElement::PlainList(RenderPlainList::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::CenterBlock(inner) => Ok(RenderElement::CenterBlock(RenderCenterBlock::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::QuoteBlock(inner) => Ok(RenderElement::QuoteBlock(RenderQuoteBlock::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::SpecialBlock(inner) => Ok(RenderElement::SpecialBlock( | ||||
|                 RenderSpecialBlock::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|             IElement::DynamicBlock(inner) => Ok(RenderElement::DynamicBlock( | ||||
|                 RenderDynamicBlock::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|             IElement::FootnoteDefinition(inner) => Ok(RenderElement::FootnoteDefinition( | ||||
|                 RenderFootnoteDefinition::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|             IElement::Comment(inner) => Ok(RenderElement::Comment(RenderComment::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::Drawer(inner) => Ok(RenderElement::Drawer(RenderDrawer::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::PropertyDrawer(inner) => Ok(RenderElement::PropertyDrawer( | ||||
|                 RenderPropertyDrawer::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|             IElement::Table(inner) => Ok(RenderElement::Table(RenderTable::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::VerseBlock(inner) => Ok(RenderElement::VerseBlock(RenderVerseBlock::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::CommentBlock(inner) => Ok(RenderElement::CommentBlock( | ||||
|                 RenderCommentBlock::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|             IElement::ExampleBlock(inner) => Ok(RenderElement::ExampleBlock( | ||||
|                 RenderExampleBlock::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|             IElement::ExportBlock(inner) => Ok(RenderElement::ExportBlock(RenderExportBlock::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::SrcBlock(inner) => Ok(RenderElement::SrcBlock(RenderSrcBlock::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::Clock(inner) => Ok(RenderElement::Clock(RenderClock::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::DiarySexp(inner) => Ok(RenderElement::DiarySexp(RenderDiarySexp::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::Planning(inner) => Ok(RenderElement::Planning(RenderPlanning::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::FixedWidthArea(inner) => Ok(RenderElement::FixedWidthArea( | ||||
|                 RenderFixedWidthArea::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|             IElement::HorizontalRule(inner) => Ok(RenderElement::HorizontalRule( | ||||
|                 RenderHorizontalRule::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|             IElement::Keyword(inner) => Ok(RenderElement::Keyword(RenderKeyword::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::BabelCall(inner) => Ok(RenderElement::BabelCall(RenderBabelCall::new( | ||||
|                 config, | ||||
|                 output_directory, | ||||
|                 output_file, | ||||
|                 inner, | ||||
|             )?)), | ||||
|             IElement::LatexEnvironment(inner) => Ok(RenderElement::LatexEnvironment( | ||||
|                 RenderLatexEnvironment::new(config, output_directory, output_file, inner)?, | ||||
|             )), | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
							
								
								
									
										23
									
								
								src/context/example_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/example_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IExampleBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "example_block")] | ||||
| pub(crate) struct RenderExampleBlock {} | ||||
| 
 | ||||
| impl RenderExampleBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IExampleBlock, | ||||
|     ) -> Result<RenderExampleBlock, CustomError> { | ||||
|         Ok(RenderExampleBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/export_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/export_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IExportBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "export_block")] | ||||
| pub(crate) struct RenderExportBlock {} | ||||
| 
 | ||||
| impl RenderExportBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IExportBlock, | ||||
|     ) -> Result<RenderExportBlock, CustomError> { | ||||
|         Ok(RenderExportBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/fixed_width_area.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/fixed_width_area.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IFixedWidthArea; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "fixed_width_area")] | ||||
| pub(crate) struct RenderFixedWidthArea {} | ||||
| 
 | ||||
| impl RenderFixedWidthArea { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IFixedWidthArea, | ||||
|     ) -> Result<RenderFixedWidthArea, CustomError> { | ||||
|         Ok(RenderFixedWidthArea {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/footnote_definition.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/footnote_definition.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IFootnoteDefinition; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "footnote_definition")] | ||||
| pub(crate) struct RenderFootnoteDefinition {} | ||||
| 
 | ||||
| impl RenderFootnoteDefinition { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IFootnoteDefinition, | ||||
|     ) -> Result<RenderFootnoteDefinition, CustomError> { | ||||
|         Ok(RenderFootnoteDefinition {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/horizontal_rule.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/horizontal_rule.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IHorizontalRule; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "horizontal_rule")] | ||||
| pub(crate) struct RenderHorizontalRule {} | ||||
| 
 | ||||
| impl RenderHorizontalRule { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IHorizontalRule, | ||||
|     ) -> Result<RenderHorizontalRule, CustomError> { | ||||
|         Ok(RenderHorizontalRule {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/latex_environment.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/latex_environment.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::ILatexEnvironment; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "latex_environment")] | ||||
| pub(crate) struct RenderLatexEnvironment {} | ||||
| 
 | ||||
| impl RenderLatexEnvironment { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &ILatexEnvironment, | ||||
|     ) -> Result<RenderLatexEnvironment, CustomError> { | ||||
|         Ok(RenderLatexEnvironment {}) | ||||
|     } | ||||
| } | ||||
| @ -1,15 +1,36 @@ | ||||
| mod babel_call; | ||||
| mod blog_post_page; | ||||
| mod center_block; | ||||
| mod clock; | ||||
| mod comment; | ||||
| mod comment_block; | ||||
| mod diary_sexp; | ||||
| mod document_element; | ||||
| mod drawer; | ||||
| mod dynamic_block; | ||||
| mod element; | ||||
| mod example_block; | ||||
| mod export_block; | ||||
| mod fixed_width_area; | ||||
| mod footnote_definition; | ||||
| mod global_settings; | ||||
| mod heading; | ||||
| mod horizontal_rule; | ||||
| mod keyword; | ||||
| mod latex_environment; | ||||
| mod object; | ||||
| mod paragraph; | ||||
| mod plain_list; | ||||
| mod plain_text; | ||||
| mod planning; | ||||
| mod property_drawer; | ||||
| mod quote_block; | ||||
| mod section; | ||||
| mod special_block; | ||||
| mod src_block; | ||||
| mod table; | ||||
| mod target; | ||||
| mod verse_block; | ||||
| 
 | ||||
| pub(crate) use blog_post_page::RenderBlogPostPage; | ||||
| pub(crate) use document_element::RenderDocumentElement; | ||||
|  | ||||
							
								
								
									
										23
									
								
								src/context/plain_list.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/plain_list.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IPlainList; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "plain_list")] | ||||
| pub(crate) struct RenderPlainList {} | ||||
| 
 | ||||
| impl RenderPlainList { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IPlainList, | ||||
|     ) -> Result<RenderPlainList, CustomError> { | ||||
|         Ok(RenderPlainList {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/planning.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/planning.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IPlanning; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "planning")] | ||||
| pub(crate) struct RenderPlanning {} | ||||
| 
 | ||||
| impl RenderPlanning { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IPlanning, | ||||
|     ) -> Result<RenderPlanning, CustomError> { | ||||
|         Ok(RenderPlanning {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/property_drawer.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/property_drawer.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IPropertyDrawer; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "property_drawer")] | ||||
| pub(crate) struct RenderPropertyDrawer {} | ||||
| 
 | ||||
| impl RenderPropertyDrawer { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IPropertyDrawer, | ||||
|     ) -> Result<RenderPropertyDrawer, CustomError> { | ||||
|         Ok(RenderPropertyDrawer {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/quote_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/quote_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IQuoteBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "quote_block")] | ||||
| pub(crate) struct RenderQuoteBlock {} | ||||
| 
 | ||||
| impl RenderQuoteBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IQuoteBlock, | ||||
|     ) -> Result<RenderQuoteBlock, CustomError> { | ||||
|         Ok(RenderQuoteBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/special_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/special_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::ISpecialBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "special_block")] | ||||
| pub(crate) struct RenderSpecialBlock {} | ||||
| 
 | ||||
| impl RenderSpecialBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &ISpecialBlock, | ||||
|     ) -> Result<RenderSpecialBlock, CustomError> { | ||||
|         Ok(RenderSpecialBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/src_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/src_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::ISrcBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "src_block")] | ||||
| pub(crate) struct RenderSrcBlock {} | ||||
| 
 | ||||
| impl RenderSrcBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &ISrcBlock, | ||||
|     ) -> Result<RenderSrcBlock, CustomError> { | ||||
|         Ok(RenderSrcBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/table.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/table.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::ITable; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "table")] | ||||
| pub(crate) struct RenderTable {} | ||||
| 
 | ||||
| impl RenderTable { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &ITable, | ||||
|     ) -> Result<RenderTable, CustomError> { | ||||
|         Ok(RenderTable {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										23
									
								
								src/context/verse_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/context/verse_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| use std::path::Path; | ||||
| 
 | ||||
| use serde::Serialize; | ||||
| 
 | ||||
| use crate::config::Config; | ||||
| use crate::error::CustomError; | ||||
| use crate::intermediate::IVerseBlock; | ||||
| 
 | ||||
| #[derive(Debug, Serialize)] | ||||
| #[serde(tag = "type")] | ||||
| #[serde(rename = "verse_block")] | ||||
| pub(crate) struct RenderVerseBlock {} | ||||
| 
 | ||||
| impl RenderVerseBlock { | ||||
|     pub(crate) fn new<D: AsRef<Path>, F: AsRef<Path>>( | ||||
|         config: &Config, | ||||
|         output_directory: D, | ||||
|         output_file: F, | ||||
|         original: &IVerseBlock, | ||||
|     ) -> Result<RenderVerseBlock, CustomError> { | ||||
|         Ok(RenderVerseBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/babel_call.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/babel_call.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IBabelCall {} | ||||
| 
 | ||||
| impl IBabelCall { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::BabelCall<'parse>, | ||||
|     ) -> Result<IBabelCall, CustomError> { | ||||
|         Ok(IBabelCall {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/center_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/center_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct ICenterBlock {} | ||||
| 
 | ||||
| impl ICenterBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::CenterBlock<'parse>, | ||||
|     ) -> Result<ICenterBlock, CustomError> { | ||||
|         Ok(ICenterBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/clock.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/clock.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IClock {} | ||||
| 
 | ||||
| impl IClock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::Clock<'parse>, | ||||
|     ) -> Result<IClock, CustomError> { | ||||
|         Ok(IClock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/comment_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/comment_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct ICommentBlock {} | ||||
| 
 | ||||
| impl ICommentBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::CommentBlock<'parse>, | ||||
|     ) -> Result<ICommentBlock, CustomError> { | ||||
|         Ok(ICommentBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/diary_sexp.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/diary_sexp.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IDiarySexp {} | ||||
| 
 | ||||
| impl IDiarySexp { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::DiarySexp<'parse>, | ||||
|     ) -> Result<IDiarySexp, CustomError> { | ||||
|         Ok(IDiarySexp {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/drawer.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/drawer.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IDrawer {} | ||||
| 
 | ||||
| impl IDrawer { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::Drawer<'parse>, | ||||
|     ) -> Result<IDrawer, CustomError> { | ||||
|         Ok(IDrawer {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/dynamic_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/dynamic_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IDynamicBlock {} | ||||
| 
 | ||||
| impl IDynamicBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::DynamicBlock<'parse>, | ||||
|     ) -> Result<IDynamicBlock, CustomError> { | ||||
|         Ok(IDynamicBlock {}) | ||||
|     } | ||||
| } | ||||
| @ -3,13 +3,55 @@ use crate::error::CustomError; | ||||
| use super::comment::IComment; | ||||
| use super::keyword::IKeyword; | ||||
| use super::registry::Registry; | ||||
| use super::IBabelCall; | ||||
| use super::ICenterBlock; | ||||
| use super::IClock; | ||||
| use super::ICommentBlock; | ||||
| use super::IDiarySexp; | ||||
| use super::IDrawer; | ||||
| use super::IDynamicBlock; | ||||
| use super::IExampleBlock; | ||||
| use super::IExportBlock; | ||||
| use super::IFixedWidthArea; | ||||
| use super::IFootnoteDefinition; | ||||
| use super::IHorizontalRule; | ||||
| use super::ILatexEnvironment; | ||||
| use super::IParagraph; | ||||
| use super::IPlainList; | ||||
| use super::IPlanning; | ||||
| use super::IPropertyDrawer; | ||||
| use super::IQuoteBlock; | ||||
| use super::ISpecialBlock; | ||||
| use super::ISrcBlock; | ||||
| use super::ITable; | ||||
| use super::IVerseBlock; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) enum IElement { | ||||
|     Paragraph(IParagraph), | ||||
|     Keyword(IKeyword), | ||||
|     PlainList(IPlainList), | ||||
|     CenterBlock(ICenterBlock), | ||||
|     QuoteBlock(IQuoteBlock), | ||||
|     SpecialBlock(ISpecialBlock), | ||||
|     DynamicBlock(IDynamicBlock), | ||||
|     FootnoteDefinition(IFootnoteDefinition), | ||||
|     Comment(IComment), | ||||
|     Drawer(IDrawer), | ||||
|     PropertyDrawer(IPropertyDrawer), | ||||
|     Table(ITable), | ||||
|     VerseBlock(IVerseBlock), | ||||
|     CommentBlock(ICommentBlock), | ||||
|     ExampleBlock(IExampleBlock), | ||||
|     ExportBlock(IExportBlock), | ||||
|     SrcBlock(ISrcBlock), | ||||
|     Clock(IClock), | ||||
|     DiarySexp(IDiarySexp), | ||||
|     Planning(IPlanning), | ||||
|     FixedWidthArea(IFixedWidthArea), | ||||
|     HorizontalRule(IHorizontalRule), | ||||
|     Keyword(IKeyword), | ||||
|     BabelCall(IBabelCall), | ||||
|     LatexEnvironment(ILatexEnvironment), | ||||
| } | ||||
| 
 | ||||
| impl IElement { | ||||
| @ -21,33 +63,75 @@ impl IElement { | ||||
|             organic::types::Element::Paragraph(inner) => { | ||||
|                 Ok(IElement::Paragraph(IParagraph::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::PlainList(_) => todo!(), | ||||
|             organic::types::Element::CenterBlock(_) => todo!(), | ||||
|             organic::types::Element::QuoteBlock(_) => todo!(), | ||||
|             organic::types::Element::SpecialBlock(_) => todo!(), | ||||
|             organic::types::Element::DynamicBlock(_) => todo!(), | ||||
|             organic::types::Element::FootnoteDefinition(_) => todo!(), | ||||
|             organic::types::Element::PlainList(inner) => { | ||||
|                 Ok(IElement::PlainList(IPlainList::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::CenterBlock(inner) => Ok(IElement::CenterBlock( | ||||
|                 ICenterBlock::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::QuoteBlock(inner) => Ok(IElement::QuoteBlock( | ||||
|                 IQuoteBlock::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::SpecialBlock(inner) => Ok(IElement::SpecialBlock( | ||||
|                 ISpecialBlock::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::DynamicBlock(inner) => Ok(IElement::DynamicBlock( | ||||
|                 IDynamicBlock::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::FootnoteDefinition(inner) => Ok(IElement::FootnoteDefinition( | ||||
|                 IFootnoteDefinition::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::Comment(inner) => { | ||||
|                 Ok(IElement::Comment(IComment::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::Drawer(_) => todo!(), | ||||
|             organic::types::Element::PropertyDrawer(_) => todo!(), | ||||
|             organic::types::Element::Table(_) => todo!(), | ||||
|             organic::types::Element::VerseBlock(_) => todo!(), | ||||
|             organic::types::Element::CommentBlock(_) => todo!(), | ||||
|             organic::types::Element::ExampleBlock(_) => todo!(), | ||||
|             organic::types::Element::ExportBlock(_) => todo!(), | ||||
|             organic::types::Element::SrcBlock(_) => todo!(), | ||||
|             organic::types::Element::Clock(_) => todo!(), | ||||
|             organic::types::Element::DiarySexp(_) => todo!(), | ||||
|             organic::types::Element::Planning(_) => todo!(), | ||||
|             organic::types::Element::FixedWidthArea(_) => todo!(), | ||||
|             organic::types::Element::HorizontalRule(_) => todo!(), | ||||
|             organic::types::Element::Drawer(inner) => { | ||||
|                 Ok(IElement::Drawer(IDrawer::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::PropertyDrawer(inner) => Ok(IElement::PropertyDrawer( | ||||
|                 IPropertyDrawer::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::Table(inner) => { | ||||
|                 Ok(IElement::Table(ITable::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::VerseBlock(inner) => Ok(IElement::VerseBlock( | ||||
|                 IVerseBlock::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::CommentBlock(inner) => Ok(IElement::CommentBlock( | ||||
|                 ICommentBlock::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::ExampleBlock(inner) => Ok(IElement::ExampleBlock( | ||||
|                 IExampleBlock::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::ExportBlock(inner) => Ok(IElement::ExportBlock( | ||||
|                 IExportBlock::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::SrcBlock(inner) => { | ||||
|                 Ok(IElement::SrcBlock(ISrcBlock::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::Clock(inner) => { | ||||
|                 Ok(IElement::Clock(IClock::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::DiarySexp(inner) => { | ||||
|                 Ok(IElement::DiarySexp(IDiarySexp::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::Planning(inner) => { | ||||
|                 Ok(IElement::Planning(IPlanning::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::FixedWidthArea(inner) => Ok(IElement::FixedWidthArea( | ||||
|                 IFixedWidthArea::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::HorizontalRule(inner) => Ok(IElement::HorizontalRule( | ||||
|                 IHorizontalRule::new(registry, inner).await?, | ||||
|             )), | ||||
|             organic::types::Element::Keyword(inner) => { | ||||
|                 Ok(IElement::Keyword(IKeyword::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::BabelCall(_) => todo!(), | ||||
|             organic::types::Element::LatexEnvironment(_) => todo!(), | ||||
|             organic::types::Element::BabelCall(inner) => { | ||||
|                 Ok(IElement::BabelCall(IBabelCall::new(registry, inner).await?)) | ||||
|             } | ||||
|             organic::types::Element::LatexEnvironment(inner) => Ok(IElement::LatexEnvironment( | ||||
|                 ILatexEnvironment::new(registry, inner).await?, | ||||
|             )), | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
							
								
								
									
										15
									
								
								src/intermediate/example_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/example_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IExampleBlock {} | ||||
| 
 | ||||
| impl IExampleBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::ExampleBlock<'parse>, | ||||
|     ) -> Result<IExampleBlock, CustomError> { | ||||
|         Ok(IExampleBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/export_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/export_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IExportBlock {} | ||||
| 
 | ||||
| impl IExportBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::ExportBlock<'parse>, | ||||
|     ) -> Result<IExportBlock, CustomError> { | ||||
|         Ok(IExportBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/fixed_width_area.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/fixed_width_area.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IFixedWidthArea {} | ||||
| 
 | ||||
| impl IFixedWidthArea { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::FixedWidthArea<'parse>, | ||||
|     ) -> Result<IFixedWidthArea, CustomError> { | ||||
|         Ok(IFixedWidthArea {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/footnote_definition.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/footnote_definition.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IFootnoteDefinition {} | ||||
| 
 | ||||
| impl IFootnoteDefinition { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::FootnoteDefinition<'parse>, | ||||
|     ) -> Result<IFootnoteDefinition, CustomError> { | ||||
|         Ok(IFootnoteDefinition {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/horizontal_rule.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/horizontal_rule.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IHorizontalRule {} | ||||
| 
 | ||||
| impl IHorizontalRule { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::HorizontalRule<'parse>, | ||||
|     ) -> Result<IHorizontalRule, CustomError> { | ||||
|         Ok(IHorizontalRule {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/latex_environment.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/latex_environment.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct ILatexEnvironment {} | ||||
| 
 | ||||
| impl ILatexEnvironment { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::LatexEnvironment<'parse>, | ||||
|     ) -> Result<ILatexEnvironment, CustomError> { | ||||
|         Ok(ILatexEnvironment {}) | ||||
|     } | ||||
| } | ||||
| @ -1,28 +1,70 @@ | ||||
| mod babel_call; | ||||
| mod center_block; | ||||
| mod clock; | ||||
| mod comment; | ||||
| mod comment_block; | ||||
| mod convert; | ||||
| mod definition; | ||||
| mod diary_sexp; | ||||
| mod document_element; | ||||
| mod drawer; | ||||
| mod dynamic_block; | ||||
| mod element; | ||||
| mod example_block; | ||||
| mod export_block; | ||||
| mod fixed_width_area; | ||||
| mod footnote_definition; | ||||
| mod heading; | ||||
| mod horizontal_rule; | ||||
| mod keyword; | ||||
| mod latex_environment; | ||||
| mod object; | ||||
| mod page; | ||||
| mod paragraph; | ||||
| mod plain_list; | ||||
| mod plain_text; | ||||
| mod planning; | ||||
| mod property_drawer; | ||||
| mod quote_block; | ||||
| mod registry; | ||||
| mod section; | ||||
| mod special_block; | ||||
| mod src_block; | ||||
| mod table; | ||||
| mod target; | ||||
| mod util; | ||||
| mod verse_block; | ||||
| pub(crate) use babel_call::IBabelCall; | ||||
| pub(crate) use center_block::ICenterBlock; | ||||
| pub(crate) use clock::IClock; | ||||
| pub(crate) use comment::IComment; | ||||
| pub(crate) use comment_block::ICommentBlock; | ||||
| pub(crate) use convert::convert_blog_post_page_to_render_context; | ||||
| pub(crate) use definition::BlogPost; | ||||
| pub(crate) use diary_sexp::IDiarySexp; | ||||
| pub(crate) use document_element::IDocumentElement; | ||||
| pub(crate) use drawer::IDrawer; | ||||
| pub(crate) use dynamic_block::IDynamicBlock; | ||||
| pub(crate) use element::IElement; | ||||
| pub(crate) use example_block::IExampleBlock; | ||||
| pub(crate) use export_block::IExportBlock; | ||||
| pub(crate) use fixed_width_area::IFixedWidthArea; | ||||
| pub(crate) use footnote_definition::IFootnoteDefinition; | ||||
| pub(crate) use heading::IHeading; | ||||
| pub(crate) use horizontal_rule::IHorizontalRule; | ||||
| pub(crate) use keyword::IKeyword; | ||||
| pub(crate) use latex_environment::ILatexEnvironment; | ||||
| pub(crate) use object::IObject; | ||||
| pub(crate) use page::BlogPostPage; | ||||
| pub(crate) use paragraph::IParagraph; | ||||
| pub(crate) use plain_list::IPlainList; | ||||
| pub(crate) use plain_text::IPlainText; | ||||
| pub(crate) use planning::IPlanning; | ||||
| pub(crate) use property_drawer::IPropertyDrawer; | ||||
| pub(crate) use quote_block::IQuoteBlock; | ||||
| pub(crate) use section::ISection; | ||||
| pub(crate) use special_block::ISpecialBlock; | ||||
| pub(crate) use src_block::ISrcBlock; | ||||
| pub(crate) use table::ITable; | ||||
| pub(crate) use target::ITarget; | ||||
| pub(crate) use verse_block::IVerseBlock; | ||||
|  | ||||
							
								
								
									
										15
									
								
								src/intermediate/plain_list.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/plain_list.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IPlainList {} | ||||
| 
 | ||||
| impl IPlainList { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         plain_list: &organic::types::PlainList<'parse>, | ||||
|     ) -> Result<IPlainList, CustomError> { | ||||
|         Ok(IPlainList {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/planning.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/planning.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IPlanning {} | ||||
| 
 | ||||
| impl IPlanning { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::Planning<'parse>, | ||||
|     ) -> Result<IPlanning, CustomError> { | ||||
|         Ok(IPlanning {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/property_drawer.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/property_drawer.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IPropertyDrawer {} | ||||
| 
 | ||||
| impl IPropertyDrawer { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::PropertyDrawer<'parse>, | ||||
|     ) -> Result<IPropertyDrawer, CustomError> { | ||||
|         Ok(IPropertyDrawer {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/quote_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/quote_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IQuoteBlock {} | ||||
| 
 | ||||
| impl IQuoteBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::QuoteBlock<'parse>, | ||||
|     ) -> Result<IQuoteBlock, CustomError> { | ||||
|         Ok(IQuoteBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/special_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/special_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct ISpecialBlock {} | ||||
| 
 | ||||
| impl ISpecialBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::SpecialBlock<'parse>, | ||||
|     ) -> Result<ISpecialBlock, CustomError> { | ||||
|         Ok(ISpecialBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/src_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/src_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct ISrcBlock {} | ||||
| 
 | ||||
| impl ISrcBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::SrcBlock<'parse>, | ||||
|     ) -> Result<ISrcBlock, CustomError> { | ||||
|         Ok(ISrcBlock {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/table.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/table.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct ITable {} | ||||
| 
 | ||||
| impl ITable { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::Table<'parse>, | ||||
|     ) -> Result<ITable, CustomError> { | ||||
|         Ok(ITable {}) | ||||
|     } | ||||
| } | ||||
							
								
								
									
										15
									
								
								src/intermediate/verse_block.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/intermediate/verse_block.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| use crate::error::CustomError; | ||||
| 
 | ||||
| use super::registry::Registry; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| pub(crate) struct IVerseBlock {} | ||||
| 
 | ||||
| impl IVerseBlock { | ||||
|     pub(crate) async fn new<'parse>( | ||||
|         registry: &mut Registry<'parse>, | ||||
|         original: &organic::types::VerseBlock<'parse>, | ||||
|     ) -> Result<IVerseBlock, CustomError> { | ||||
|         Ok(IVerseBlock {}) | ||||
|     } | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander