summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-09 14:05:57 +0200
committerLaurenz <laurmaedje@gmail.com>2021-06-09 22:44:40 +0200
commitbce553a991f19b2b5bb9efef6b74bd12e15a10c6 (patch)
treefa8ed4b3974927b30e6cffd0d71d4c3e980698de /src/syntax
parent29cfef0a6dfef5820bda339d327638e285aaf4d3 (diff)
Tidy up
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/expr.rs2
-rw-r--r--src/syntax/token.rs6
2 files changed, 4 insertions, 4 deletions
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",