pub enum TokenKind {
Show 78 variants
And,
Convert,
Asterisk,
BoolLiteral(bool),
Break,
Catch,
Coalesce,
Colon,
DoubleColon,
DoubleSlashEqual,
Comma,
Comment(String),
Continue,
Def,
Do,
Elif,
Else,
End,
Env(SmolStr),
Eof,
Equal,
EqEq,
Fn,
Foreach,
Gt,
Gte,
Ident(SmolStr),
If,
Include,
InterpolatedString(Vec<StringSegment>),
Import,
LBrace,
LBracket,
Let,
LeftShift,
Loop,
Lt,
Lte,
Macro,
Match,
Module,
Minus,
MinusEqual,
NeEq,
NewLine,
Nodes,
None,
Not,
NumberLiteral(Number),
Or,
Percent,
PercentEqual,
Pipe,
PipeEqual,
Plus,
PlusEqual,
Question,
Quote,
RBrace,
DoubleDot,
RBracket,
RightShift,
RParen,
Selector(SmolStr),
Self_,
SemiColon,
Slash,
SlashEqual,
StringLiteral(String),
StarEqual,
Tab(usize),
TildeEqual,
Try,
Unquote,
Whitespace(usize),
While,
LParen,
Var,
}Expand description
Represents the kind of a token in the mq language.
TokenKind variants are sorted alphabetically for maintainability.
Variants§
And
Convert
Asterisk
BoolLiteral(bool)
Break
Catch
Coalesce
Colon
DoubleColon
DoubleSlashEqual
Comma
Comment(String)
Continue
Def
Do
Elif
Else
End
Env(SmolStr)
Eof
Equal
EqEq
Fn
Foreach
Gt
Gte
Ident(SmolStr)
If
Include
InterpolatedString(Vec<StringSegment>)
Import
LBrace
LBracket
Let
LeftShift
Loop
Lt
Lte
Macro
Match
Module
Minus
MinusEqual
NeEq
NewLine
Nodes
None
Not
NumberLiteral(Number)
Or
Percent
PercentEqual
Pipe
PipeEqual
Plus
PlusEqual
Question
Quote
RBrace
DoubleDot
RBracket
RightShift
RParen
Selector(SmolStr)
Self_
SemiColon
Slash
SlashEqual
StringLiteral(String)
StarEqual
Tab(usize)
TildeEqual
Try
Unquote
Whitespace(usize)
While
LParen
Var
Trait Implementations§
Source§impl Ord for TokenKind
impl Ord for TokenKind
Source§impl PartialOrd for TokenKind
impl PartialOrd for TokenKind
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more