Rename some tokens to standartize naming
This commit is contained in:
parent
2a31ed08b8
commit
7ed934e2b8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user