pub enum TokenKind {
Show 87 variants
Integer,
Imaginary,
String,
FormatStringStart,
FormatStringText,
FormatStringInterpolationStart,
FormatStringInterpolationEnd,
FormatStringEnd,
Char,
Boolean,
Float,
Identifier,
Comment,
DocComment,
Semicolon,
LeftParen,
RightParen,
LeftSquareBracket,
RightSquareBracket,
LeftCurlyBrace,
RightCurlyBrace,
LeftAngleBracket,
RightAngleBracket,
Arrow,
ArrowDouble,
Equal,
EqualDouble,
NotEqual,
GreaterThanOrEqual,
LessThanOrEqual,
Colon,
Pipe,
PipeDouble,
Pipeline,
Ampersand,
AmpersandDouble,
Plus,
Minus,
Star,
Slash,
PlusEqual,
MinusEqual,
StarEqual,
SlashEqual,
PercentEqual,
Caret,
Percent,
Bang,
QuestionMark,
Dot,
Comma,
Hash,
DotDot,
DotDotEqual,
Backtick,
Function,
Let,
If,
Else,
Match,
Enum,
Struct,
Type,
Interface,
Impl,
Const,
Var,
Return,
Defer,
Import,
Mut,
Pub,
For,
In_,
While,
Loop,
Break,
Continue,
Select,
Task,
Try,
Recover,
As,
Directive,
EOF,
Placeholder,
Error,
}Variants§
Integer
Imaginary
String
FormatStringStart
FormatStringText
FormatStringInterpolationStart
FormatStringInterpolationEnd
FormatStringEnd
Char
Boolean
Float
Identifier
Comment
DocComment
Semicolon
LeftParen
RightParen
LeftSquareBracket
RightSquareBracket
LeftCurlyBrace
RightCurlyBrace
LeftAngleBracket
RightAngleBracket
Arrow
ArrowDouble
Equal
EqualDouble
NotEqual
GreaterThanOrEqual
LessThanOrEqual
Colon
Pipe
PipeDouble
Pipeline
Ampersand
AmpersandDouble
Plus
Minus
Star
Slash
PlusEqual
MinusEqual
StarEqual
SlashEqual
PercentEqual
Caret
Percent
Bang
QuestionMark
Dot
Comma
Hash
DotDot
DotDotEqual
Backtick
Function
Let
If
Else
Match
Enum
Struct
Type
Interface
Impl
Const
Var
Return
Defer
Import
Mut
Pub
For
In_
While
Loop
Break
Continue
Select
Task
Try
Recover
As
Directive
EOF
Placeholder
Error
Implementations§
Source§impl TokenKind
impl TokenKind
pub fn from_keyword(s: &str) -> Option<Self>
pub fn is_keyword(&self) -> bool
pub fn from_three_char_symbol(c1: char, c2: char, c3: char) -> Option<Self>
pub fn from_two_char_symbol(c1: char, c2: char) -> Option<Self>
pub fn from_one_char_symbol(c: char) -> Option<Self>
Trait Implementations§
impl Copy for TokenKind
impl StructuralPartialEq for TokenKind
Auto Trait Implementations§
impl Freeze for TokenKind
impl RefUnwindSafe for TokenKind
impl Send for TokenKind
impl Sync for TokenKind
impl Unpin for TokenKind
impl UnsafeUnpin for TokenKind
impl UnwindSafe for TokenKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more