diff options
| author | Martin Haug <mhaug@live.de> | 2021-06-01 14:56:02 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-09 22:44:40 +0200 |
| commit | 73fa2eda2c23bd3baeb9e22b99eb0bfb183fc638 (patch) | |
| tree | de42d0b6807b862cc28db5197751d5c503663c3c /src/eval/mod.rs | |
| parent | 9983634cd59b75a5842a096cc5fbf6472e65b5cb (diff) | |
Introduce `fr`s
Diffstat (limited to 'src/eval/mod.rs')
| -rw-r--r-- | src/eval/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs index d1307b6d..5bc2f101 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -18,7 +18,7 @@ use std::rc::Rc; use crate::cache::Cache; use crate::color::Color; use crate::diag::{Diag, DiagSet, Pass}; -use crate::geom::{Angle, Length, Relative}; +use crate::geom::{Angle, Fractional, Length, Relative}; use crate::loading::{FileHash, Loader}; use crate::parse::parse; use crate::syntax::visit::Visit; @@ -250,6 +250,7 @@ impl Eval for Expr { Self::Length(_, v, unit) => Value::Length(Length::with_unit(v, unit)), Self::Angle(_, v, unit) => Value::Angle(Angle::with_unit(v, unit)), Self::Percent(_, v) => Value::Relative(Relative::new(v / 100.0)), + Self::Fractional(_, v) => Value::Fractional(Fractional::new(v)), Self::Color(_, v) => Value::Color(Color::Rgba(v)), Self::Str(_, ref v) => Value::Str(v.clone()), Self::Ident(ref v) => match ctx.scopes.get(&v) { |
