pub enum TokenKind {
Show 87 variants
Identifier(String),
Integer((BigUint, LiteralKind)),
HexInteger((BigUint, LiteralKind)),
BinInteger((BigUint, LiteralKind)),
True,
False,
Low,
High,
HighImp,
Reg,
Let,
Decl,
Instance,
Reset,
Initial,
If,
Else,
Match,
Set,
Pipeline,
Stage,
Entity,
Trait,
Impl,
For,
Function,
Enum,
Struct,
Port,
Mod,
Use,
As,
Assert,
Mut,
Inv,
Where,
Gen,
Extern,
Plus,
Minus,
Asterisk,
Slash,
Percentage,
Equals,
NotEquals,
Lt,
Gt,
Le,
Ge,
ArithmeticRightShift,
RightShift,
LeftShift,
LogicalOr,
LogicalAnd,
LogicalXor,
Ampersand,
BitwiseOr,
Not,
BitwiseXor,
Tilde,
InfixOperatorSeparator,
SingleQuote,
Assignment,
OpenParen,
CloseParen,
OpenBrace,
CloseBrace,
OpenBracket,
CloseBracket,
FatArrow,
SlimArrow,
Comma,
Dot,
DotDot,
Semi,
GreekQuestionMark,
Colon,
PathSeparator,
Hash,
Dollar,
OutsideDocumentation(String),
InsideDocumentation(String),
Whitespace,
Comment,
BlockCommentStart,
BlockCommentEnd,
Eof,
}
Variants§
Identifier(String)
Integer((BigUint, LiteralKind))
HexInteger((BigUint, LiteralKind))
BinInteger((BigUint, LiteralKind))
True
False
Low
High
HighImp
Reg
Let
Decl
Instance
Reset
Initial
If
Else
Match
Set
Pipeline
Stage
Entity
Trait
Impl
For
Function
Enum
Struct
Port
Mod
Use
As
Assert
Mut
Inv
Where
Gen
Extern
Plus
Minus
Asterisk
Slash
Percentage
Equals
NotEquals
Lt
Gt
Le
Ge
ArithmeticRightShift
RightShift
LeftShift
LogicalOr
LogicalAnd
LogicalXor
Ampersand
BitwiseOr
Not
BitwiseXor
Tilde
InfixOperatorSeparator
SingleQuote
Assignment
OpenParen
CloseParen
OpenBrace
CloseBrace
OpenBracket
CloseBracket
FatArrow
SlimArrow
Comma
Dot
DotDot
Semi
GreekQuestionMark
Colon
PathSeparator
Hash
Dollar
OutsideDocumentation(String)
InsideDocumentation(String)
Whitespace
Ignoring whitespace
Comment
BlockCommentStart
BlockCommentEnd
Eof
Implementations§
Trait Implementations§
Source§impl<'s> Logos<'s> for TokenKind
impl<'s> Logos<'s> for TokenKind
Source§type Error = ()
type Error = ()
Error type returned by the lexer. This can be set using
#[logos(error = MyError)]
. Defaults to ()
if not set.Source§type Extras = ()
type Extras = ()
Associated type
Extras
for the particular lexer. This can be set using
#[logos(extras = MyExtras)]
and accessed inside callbacks.Source§type Source = str
type Source = str
Source type this token can be lexed from. This will default to
str
,
unless one of the defined patterns explicitly uses non-unicode byte values
or byte slices, in which case that implementation will use [u8]
.Source§fn lex(lex: &mut Lexer<'s, Self>)
fn lex(lex: &mut Lexer<'s, Self>)
The heart of Logos. Called by the
Lexer
. The implementation for this function
is generated by the logos-derive
crate.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 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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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