diff --git a/rottlib/src/lexer/lexing.rs b/rottlib/src/lexer/lexing.rs index 2cf4628..d1996aa 100644 --- a/rottlib/src/lexer/lexing.rs +++ b/rottlib/src/lexer/lexing.rs @@ -267,9 +267,9 @@ pub enum Token { Minus, // ## String manipulation #[token("@")] - AtChar, + ConcatSpace, #[token("$")] - DollarChar, + Concat, // ## Shifts #[token("<<")] LeftShift, @@ -328,9 +328,9 @@ pub enum Token { // # Punctuation & delimiters #[token("(")] - LeftParen, + LeftParenthesis, #[token(")")] - RightParen, + RightParenthesis, #[token("{", handle_brace)] Brace(BraceKind), #[token("}")] @@ -358,7 +358,7 @@ pub enum Token { #[regex(r"/\*", handle_block_comment)] BlockComment, #[regex(r"\r\n|\n|\r")] - NewLine, + Newline, #[regex(r"[ \t]+")] Whitespace, @@ -369,7 +369,7 @@ pub enum Token { impl Token { /// Returns `true` if this token is a newline (`Token::NewLine`). pub fn is_newline(&self) -> bool { - matches!(self, Token::NewLine) + matches!(self, Token::Newline) } /// Returns `true` if this token is trivia whitespace @@ -377,7 +377,7 @@ impl Token { /// /// Note: comments are **not** considered whitespace. pub fn is_whitespace(&self) -> bool { - matches!(&self, Token::Whitespace | Token::NewLine) + matches!(&self, Token::Whitespace | Token::Newline) } /// Returns `true` if this token may span multiple physical lines