summaryrefslogtreecommitdiff
path: root/src/syntax/token.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-01-26 13:49:04 +0100
committerLaurenz <laurmaedje@gmail.com>2021-01-26 13:49:04 +0100
commit16ac3f3ebc49c5a6e3f61d8546f2f187b191c346 (patch)
tree7b66f108f23c64614a507e2815f706ceb72df157 /src/syntax/token.rs
parentac788f2082711161ec8208eede04d9a2bae02241 (diff)
Small improvements ♻
Diffstat (limited to 'src/syntax/token.rs')
-rw-r--r--src/syntax/token.rs37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/syntax/token.rs b/src/syntax/token.rs
index 43415198..432b4dc5 100644
--- a/src/syntax/token.rs
+++ b/src/syntax/token.rs
@@ -61,8 +61,6 @@ pub enum Token<'s> {
StarEq,
/// A slash followed by an equals sign: `/=`.
SlashEq,
- /// A question mark: `?`.
- Question,
/// Two dots: `..`.
Dots,
/// An equals sign followed by a greater-than sign: `=>`.
@@ -212,30 +210,29 @@ impl<'s> Token<'s> {
Self::Eq => "assignment operator",
Self::EqEq => "equality operator",
Self::BangEq => "inequality operator",
- Self::Lt => "less than operator",
- Self::LtEq => "less than or equal operator",
- Self::Gt => "greater than operator",
- Self::GtEq => "greater than or equal operator",
+ Self::Lt => "less-than operator",
+ Self::LtEq => "less-than or equal operator",
+ Self::Gt => "greater-than operator",
+ Self::GtEq => "greater-than or equal operator",
Self::PlusEq => "add-assign operator",
Self::HyphEq => "subtract-assign operator",
Self::StarEq => "multiply-assign operator",
Self::SlashEq => "divide-assign operator",
- Self::Question => "question mark",
Self::Dots => "dots",
Self::Arrow => "arrow",
- Self::Not => "not operator",
- Self::And => "and operator",
- Self::Or => "or operator",
- Self::Let => "let keyword",
- Self::If => "if keyword",
- Self::Else => "else keyword",
- Self::For => "for keyword",
- Self::In => "in keyword",
- Self::While => "while keyword",
- Self::Break => "break keyword",
- Self::Continue => "continue keyword",
- Self::Return => "return keyword",
- Self::None => "none",
+ Self::Not => "operator `not`",
+ Self::And => "operator `and`",
+ Self::Or => "operator `or`",
+ Self::Let => "keyword `let`",
+ Self::If => "keyword `if`",
+ Self::Else => "keyword `else`",
+ Self::For => "keyword `for`",
+ Self::In => "keyword `in`",
+ Self::While => "keyword `while`",
+ Self::Break => "keyword `break`",
+ Self::Continue => "keyword `continue`",
+ Self::Return => "keyword `return`",
+ Self::None => "`none`",
Self::Space(_) => "space",
Self::Text(_) => "text",
Self::Raw(_) => "raw block",