summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/expr.rs4
-rw-r--r--src/syntax/token.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/syntax/expr.rs b/src/syntax/expr.rs
index ae876209..78f4feee 100644
--- a/src/syntax/expr.rs
+++ b/src/syntax/expr.rs
@@ -1,6 +1,6 @@
use super::*;
use crate::color::RgbaColor;
-use crate::geom::Unit;
+use crate::geom::LengthUnit;
/// An expression.
#[derive(Debug, Clone, PartialEq)]
@@ -16,7 +16,7 @@ pub enum Expr {
/// A floating-point literal: `1.2`, `10e-4`.
Float(f64),
/// A length literal: `12pt`, `3cm`.
- Length(f64, Unit),
+ Length(f64, LengthUnit),
/// A percent literal: `50%`.
///
/// _Note_: `50%` is stored as `50.0` here, but as `0.5` in the
diff --git a/src/syntax/token.rs b/src/syntax/token.rs
index 78519962..fb50c4ec 100644
--- a/src/syntax/token.rs
+++ b/src/syntax/token.rs
@@ -1,4 +1,4 @@
-use crate::geom::Unit;
+use crate::geom::LengthUnit;
/// A minimal semantic entity of source code.
#[derive(Debug, Copy, Clone, PartialEq)]
@@ -70,7 +70,7 @@ pub enum Token<'s> {
/// A floating-point number: `1.2`, `10e-4`.
Float(f64),
/// A length: `12pt`, `3cm`.
- Length(f64, Unit),
+ Length(f64, LengthUnit),
/// A percentage: `50%`.
///
/// _Note_: `50%` is stored as `50.0` here, as in the corresponding