pub enum TokenKind {
Show 25 variants
Eof,
Directive,
Entry,
Func,
Reg,
Shared,
Local,
Global,
Param,
Identifier,
Integer,
Float,
Instruction,
Label,
Comment,
LBrace,
RBrace,
LParen,
RParen,
LBracket,
RBracket,
Comma,
Semicolon,
Colon,
Unknown,
}Expand description
Token kinds for PTX lexing
Variants§
Eof
End of file
Directive
.version, .target, .address_size, etc.
Entry
.entry keyword
Func
.func keyword
Reg
.reg declaration
.shared declaration
Local
.local declaration
Global
.global declaration
Param
.param declaration
Identifier
Identifier (register name, label, etc.)
Integer
Integer literal
Float
Float literal
Instruction
Instruction (ld, st, mov, add, etc.)
Label
Label (name:)
Comment
Comment (// or /* */)
LBrace
Opening brace {
RBrace
Closing brace }
LParen
Opening parenthesis (
RParen
Closing parenthesis )
LBracket
Opening bracket [
RBracket
Closing bracket ]
Comma
Comma ,
Semicolon
Semicolon ;
Colon
Colon :
Unknown
Unknown token
Trait Implementations§
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