diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-10 20:01:18 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-10 23:10:17 +0200 |
| commit | 6a4823461f491aef63451f097ddfe5602e0b2157 (patch) | |
| tree | ad11b0ad169d030942d950573c729d50f7b3291b /src/exec/context.rs | |
| parent | 36b3067c19c8743032a44f888ee48702b88d135b (diff) | |
Reference-count complex values
Rename some nodes types
Diffstat (limited to 'src/exec/context.rs')
| -rw-r--r-- | src/exec/context.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/exec/context.rs b/src/exec/context.rs index 4764a808..04c0169d 100644 --- a/src/exec/context.rs +++ b/src/exec/context.rs @@ -4,10 +4,10 @@ use std::rc::Rc; use super::{Exec, ExecWithMap, FontFamily, State}; use crate::diag::{Diag, DiagSet, Pass}; use crate::eco::EcoString; -use crate::eval::{ExprMap, TemplateValue}; +use crate::eval::{ExprMap, Template}; use crate::geom::{Align, Dir, Gen, GenAxis, Length, Linear, Sides, Size}; use crate::layout::{ - AnyNode, LayoutTree, PadNode, PageRun, ParChild, ParNode, StackChild, StackNode, + LayoutNode, LayoutTree, PadNode, PageRun, ParChild, ParNode, StackChild, StackNode, }; use crate::syntax::{Span, SyntaxTree}; @@ -53,7 +53,7 @@ impl ExecContext { } /// Execute a template and return the result as a stack node. - pub fn exec_template_stack(&mut self, template: &TemplateValue) -> StackNode { + pub fn exec_template_stack(&mut self, template: &Template) -> StackNode { self.exec_stack(|ctx| template.exec(ctx)) } @@ -88,13 +88,13 @@ impl ExecContext { } /// Push any node into the active paragraph. - pub fn push_into_par(&mut self, node: impl Into<AnyNode>) { + pub fn push_into_par(&mut self, node: impl Into<LayoutNode>) { let align = self.state.aligns.cross; self.stack.par.push(ParChild::Any(node.into(), align)); } /// Push any node into the active stack. - pub fn push_into_stack(&mut self, node: impl Into<AnyNode>) { + pub fn push_into_stack(&mut self, node: impl Into<LayoutNode>) { self.parbreak(); let aligns = self.state.aligns; self.stack.push(StackChild::Any(node.into(), aligns)); |
