diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-28 15:50:48 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-28 23:54:34 +0100 |
| commit | 3ca5b238238e1128aa7bbfbd5db9e632045d8600 (patch) | |
| tree | 2471f4b340a15695b7f4d518c0b39fabaea676c4 /src/eval/mod.rs | |
| parent | b63c21c91d99a1554a019dc275f955d3e6a34271 (diff) | |
Reorganize library
Diffstat (limited to 'src/eval/mod.rs')
| -rw-r--r-- | src/eval/mod.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs index 380e9e9d..f8b4b0f0 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -120,7 +120,7 @@ impl Eval for StrongNode { type Output = Template; fn eval(&self, ctx: &mut Context, scp: &mut Scopes) -> EvalResult<Self::Output> { - Ok(Template::show(library::StrongNode( + Ok(Template::show(library::text::StrongNode( self.body().eval(ctx, scp)?, ))) } @@ -130,7 +130,7 @@ impl Eval for EmphNode { type Output = Template; fn eval(&self, ctx: &mut Context, scp: &mut Scopes) -> EvalResult<Self::Output> { - Ok(Template::show(library::EmphNode( + Ok(Template::show(library::text::EmphNode( self.body().eval(ctx, scp)?, ))) } @@ -140,12 +140,12 @@ impl Eval for RawNode { type Output = Template; fn eval(&self, _: &mut Context, _: &mut Scopes) -> EvalResult<Self::Output> { - let template = Template::show(library::RawNode { + let template = Template::show(library::text::RawNode { text: self.text.clone(), block: self.block, }); Ok(match self.lang { - Some(_) => template.styled(library::RawNode::LANG, self.lang.clone()), + Some(_) => template.styled(library::text::RawNode::LANG, self.lang.clone()), None => template, }) } @@ -155,7 +155,7 @@ impl Eval for MathNode { type Output = Template; fn eval(&self, _: &mut Context, _: &mut Scopes) -> EvalResult<Self::Output> { - Ok(Template::show(library::MathNode { + Ok(Template::show(library::elements::MathNode { formula: self.formula.clone(), display: self.display, })) @@ -166,7 +166,7 @@ impl Eval for HeadingNode { type Output = Template; fn eval(&self, ctx: &mut Context, scp: &mut Scopes) -> EvalResult<Self::Output> { - Ok(Template::show(library::HeadingNode { + Ok(Template::show(library::elements::HeadingNode { body: self.body().eval(ctx, scp)?, level: self.level(), })) @@ -177,7 +177,7 @@ impl Eval for ListNode { type Output = Template; fn eval(&self, ctx: &mut Context, scp: &mut Scopes) -> EvalResult<Self::Output> { - Ok(Template::List(library::ListItem { + Ok(Template::List(library::elements::ListItem { number: None, body: Box::new(self.body().eval(ctx, scp)?), })) @@ -188,7 +188,7 @@ impl Eval for EnumNode { type Output = Template; fn eval(&self, ctx: &mut Context, scp: &mut Scopes) -> EvalResult<Self::Output> { - Ok(Template::Enum(library::ListItem { + Ok(Template::Enum(library::elements::ListItem { number: self.number(), body: Box::new(self.body().eval(ctx, scp)?), })) |
