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/syntax/token.rs | |
| parent | 9983634cd59b75a5842a096cc5fbf6472e65b5cb (diff) | |
Introduce `fr`s
Diffstat (limited to 'src/syntax/token.rs')
| -rw-r--r-- | src/syntax/token.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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", |
