summaryrefslogtreecommitdiff
path: root/src/eval/value.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-30 11:40:27 +0200
committerLaurenz <laurmaedje@gmail.com>2021-06-30 11:40:27 +0200
commit470f8001a1dba0022ec9d3e46c67c3bbc31359be (patch)
treed68f60533201658148ea508c90ba704f806561d5 /src/eval/value.rs
parent45812b700114a51f0ee21e31f4454cde3729eaf5 (diff)
No more collisions between syntax::Tree and layout::Tree
Diffstat (limited to 'src/eval/value.rs')
-rw-r--r--src/eval/value.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/eval/value.rs b/src/eval/value.rs
index 0da2a5be..472df0ea 100644
--- a/src/eval/value.rs
+++ b/src/eval/value.rs
@@ -10,7 +10,7 @@ use super::EvalContext;
use crate::color::{Color, RgbaColor};
use crate::exec::ExecContext;
use crate::geom::{Angle, Fractional, Length, Linear, Relative};
-use crate::syntax::{Expr, Span, Spanned, Tree};
+use crate::syntax::{Expr, Span, Spanned, SyntaxTree};
/// A computational value.
#[derive(Debug, Clone, PartialEq)]
@@ -165,8 +165,8 @@ pub enum TemplateNode {
/// expression.
Tree {
/// The syntax tree of the corresponding template expression.
- tree: Rc<Tree>,
- /// The evaluated expressions for the `tree`.
+ tree: Rc<SyntaxTree>,
+ /// The evaluated expressions in the syntax tree.
map: ExprMap,
},
/// A template that was converted from a string.
@@ -184,10 +184,10 @@ impl PartialEq for TemplateNode {
/// A map from expressions to the values they evaluated to.
///
-/// The raw pointers point into the expressions contained in some [`Tree`].
-/// Since the lifetime is erased, the tree could go out of scope while the hash
-/// map still lives. Although this could lead to lookup panics, it is not unsafe
-/// since the pointers are never dereferenced.
+/// The raw pointers point into the expressions contained in some
+/// [`SyntaxTree`]. Since the lifetime is erased, the tree could go out of scope
+/// while the hash map still lives. Although this could lead to lookup panics,
+/// it is not unsafe since the pointers are never dereferenced.
pub type ExprMap = HashMap<*const Expr, Value>;
/// A reference-counted dynamic template node that can implement custom