From 73fa2eda2c23bd3baeb9e22b99eb0bfb183fc638 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Tue, 1 Jun 2021 14:56:02 +0200 Subject: Introduce `fr`s --- src/syntax/token.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/syntax/token.rs') diff --git a/src/syntax/token.rs b/src/syntax/token.rs index 9098f176..56ab3dd6 100644 --- a/src/syntax/token.rs +++ b/src/syntax/token.rs @@ -133,6 +133,8 @@ pub enum Token<'s> { /// _Note_: `50%` is stored as `50.0` here, as in the corresponding /// [literal](super::Expr::Percent). Percent(f64), + /// A fraction unit: `3fr`. + Fraction(f64), /// A color value: `#20d82a`. Color(RgbaColor), /// A quoted string: `"..."`. @@ -258,6 +260,7 @@ impl<'s> Token<'s> { Self::Length(_, _) => "length", Self::Angle(_, _) => "angle", Self::Percent(_) => "percentage", + Self::Fraction(_) => "`fr` value", Self::Color(_) => "color", Self::Str(_) => "string", Self::LineComment(_) => "line comment", -- cgit v1.2.3