From bce553a991f19b2b5bb9efef6b74bd12e15a10c6 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 9 Jun 2021 14:05:57 +0200 Subject: Tidy up --- src/syntax/expr.rs | 2 +- src/syntax/token.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/syntax') diff --git a/src/syntax/expr.rs b/src/syntax/expr.rs index 17e4a196..24850d65 100644 --- a/src/syntax/expr.rs +++ b/src/syntax/expr.rs @@ -9,7 +9,7 @@ use crate::geom::{AngularUnit, LengthUnit}; pub enum Expr { /// The none literal: `none`. None(Span), - /// The `auto` constant. + /// The auto literal: `auto`. Auto(Span), /// A boolean literal: `true`, `false`. Bool(Span, bool), diff --git a/src/syntax/token.rs b/src/syntax/token.rs index 26c01fbb..2263f806 100644 --- a/src/syntax/token.rs +++ b/src/syntax/token.rs @@ -76,6 +76,8 @@ pub enum Token<'s> { Or, /// The none literal: `none`. None, + /// The auto literal: `auto`. + Auto, /// The `let` keyword. Let, /// The `if` keyword. @@ -100,8 +102,6 @@ pub enum Token<'s> { Include, /// The `using` keyword. Using, - /// The `auto` keyword. - Auto, /// One or more whitespace characters. /// /// The contained `usize` denotes the number of newlines that were contained @@ -238,6 +238,7 @@ impl<'s> Token<'s> { Self::And => "operator `and`", Self::Or => "operator `or`", Self::None => "`none`", + Self::Auto => "`auto`", Self::Let => "keyword `let`", Self::If => "keyword `if`", Self::Else => "keyword `else`", @@ -250,7 +251,6 @@ impl<'s> Token<'s> { Self::Import => "keyword `import`", Self::Include => "keyword `include`", Self::Using => "keyword `using`", - Self::Auto => "keyword `auto`", Self::Space(_) => "space", Self::Text(_) => "text", Self::UnicodeEscape(_) => "unicode escape sequence", -- cgit v1.2.3