diff --git a/src/context/src_block.rs b/src/context/src_block.rs index 0c19570..6c06124 100644 --- a/src/context/src_block.rs +++ b/src/context/src_block.rs @@ -9,7 +9,9 @@ use crate::intermediate::ISrcBlock; #[derive(Debug, Serialize)] #[serde(tag = "type")] #[serde(rename = "src_block")] -pub(crate) struct RenderSrcBlock {} +pub(crate) struct RenderSrcBlock { + lines: Vec, +} impl RenderSrcBlock { pub(crate) fn new( @@ -18,6 +20,8 @@ impl RenderSrcBlock { output_file: &Path, original: &ISrcBlock, ) -> Result { - Ok(RenderSrcBlock {}) + Ok(RenderSrcBlock { + lines: original.lines.clone(), + }) } } diff --git a/src/intermediate/src_block.rs b/src/intermediate/src_block.rs index ed90cd0..9fa4a0d 100644 --- a/src/intermediate/src_block.rs +++ b/src/intermediate/src_block.rs @@ -3,13 +3,18 @@ use crate::error::CustomError; use super::registry::Registry; #[derive(Debug)] -pub(crate) struct ISrcBlock {} +pub(crate) struct ISrcBlock { + pub(crate) lines: Vec, +} impl ISrcBlock { pub(crate) async fn new<'parse>( registry: &mut Registry<'parse>, original: &organic::types::SrcBlock<'parse>, ) -> Result { - Ok(ISrcBlock {}) + // let contents = original.contents. + Ok(ISrcBlock { + lines: Vec::new(), // TODO + }) } }