pub enum Token {
Show 109 variants
Global,
Device,
Host,
Shared,
Constant,
Extern,
Void,
Int,
Unsigned,
Float,
Double,
Char,
Short,
Long,
Bool,
Const,
Volatile,
Restrict,
RestrictC,
If,
Else,
For,
While,
Do,
Return,
Break,
Continue,
Struct,
Typedef,
Sizeof,
Register,
Static,
Inline,
InlineAlt,
ForceInline,
ThreadIdx,
BlockIdx,
BlockDim,
GridDim,
SyncThreads,
Float2,
Float3,
Float4,
Int2,
Int3,
Int4,
Double2,
Double3,
Double4,
Dim3,
HexLiteral(String),
FloatLiteral(String),
FloatLiteralDot(String),
FloatLiteralExp(String),
FloatLiteralSuffix(String),
IntLiteral(String),
StringLiteral(String),
CharLiteral(String),
Ident(String),
PlusAssign,
MinusAssign,
StarAssign,
SlashAssign,
PercentAssign,
AmpAssign,
PipeAssign,
CaretAssign,
ShlAssign,
ShrAssign,
PlusPlus,
MinusMinus,
AmpAmp,
PipePipe,
EqEq,
BangEq,
LtEq,
GtEq,
Shl,
Shr,
Arrow,
Plus,
Minus,
Star,
Slash,
Percent,
Amp,
Pipe,
Caret,
Tilde,
Bang,
Eq,
Lt,
Gt,
Question,
Colon,
LParen,
RParen,
LBrace,
RBrace,
LBracket,
RBracket,
Semi,
Comma,
Dot,
Include(String),
Define(String),
Preprocessor(String),
LineComment,
BlockComment,
}Expand description
Token types for CUDA source code
Variants§
Global
Device
Host
Constant
Extern
Void
Int
Unsigned
Float
Double
Char
Short
Long
Bool
Const
Volatile
Restrict
RestrictC
If
Else
For
While
Do
Return
Break
Continue
Struct
Typedef
Sizeof
Register
Static
Inline
InlineAlt
ForceInline
ThreadIdx
BlockIdx
BlockDim
GridDim
SyncThreads
Float2
Float3
Float4
Int2
Int3
Int4
Double2
Double3
Double4
Dim3
HexLiteral(String)
FloatLiteral(String)
FloatLiteralDot(String)
FloatLiteralExp(String)
FloatLiteralSuffix(String)
IntLiteral(String)
StringLiteral(String)
CharLiteral(String)
Ident(String)
PlusAssign
MinusAssign
StarAssign
SlashAssign
PercentAssign
AmpAssign
PipeAssign
CaretAssign
ShlAssign
ShrAssign
PlusPlus
MinusMinus
AmpAmp
PipePipe
EqEq
BangEq
LtEq
GtEq
Shl
Shr
Arrow
Plus
Minus
Star
Slash
Percent
Amp
Pipe
Caret
Tilde
Bang
Eq
Lt
Gt
Question
Colon
LParen
RParen
LBrace
RBrace
LBracket
RBracket
Semi
Comma
Dot
Include(String)
Define(String)
Preprocessor(String)
LineComment
BlockComment
Trait Implementations§
Source§impl<'s> Logos<'s> for Token
impl<'s> Logos<'s> for Token
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 Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
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