pub enum RISCVToken<'a> {
Show 32 variants
Comma,
Newline,
Colon,
LParen,
RParen,
ImmediateInt(i128),
ImmediateFloat(f64),
ImmediateString(&'a str),
Symbol(Symbol<'a>),
MacroParameter(&'a str),
Align,
Ascii,
Asciz,
Byte,
Data,
Double,
Dword,
EndMacro,
Eqv,
Extern,
Float,
Global,
Half,
Include,
MacroDef,
Macro,
Section,
Space,
String,
Text,
Word,
UnknownDirective(&'a str),
}
Variants§
Comma
Newline
Colon
LParen
RParen
ImmediateInt(i128)
ImmediateFloat(f64)
ImmediateString(&'a str)
Symbol(Symbol<'a>)
MacroParameter(&'a str)
Align
Ascii
Asciz
Byte
Data
Double
Dword
EndMacro
Eqv
Extern
Float
Global
Half
Include
MacroDef
Macro
Section
Space
String
Text
Word
UnknownDirective(&'a str)
Trait Implementations§
source§impl<'s> Logos<'s> for RISCVToken<'s>
impl<'s> Logos<'s> for RISCVToken<'s>
§type Error = LexingError
type Error = LexingError
Error type returned by the lexer. This can be set using
#[logos(error = MyError)]
. Defaults to ()
if not set.§type Extras = (usize, usize)
type Extras = (usize, usize)
Associated type
Extras
for the particular lexer. This can be set using
#[logos(extras = MyExtras)]
and accessed inside callbacks.§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.§fn lexer_with_extras(
source: &'source Self::Source,
extras: Self::Extras,
) -> Lexer<'source, Self> ⓘ
fn lexer_with_extras( source: &'source Self::Source, extras: Self::Extras, ) -> Lexer<'source, Self> ⓘ
Create a new instance of a
Lexer
with the provided Extras
that will
produce tokens implementing this Logos
.Auto Trait Implementations§
impl<'a> Freeze for RISCVToken<'a>
impl<'a> RefUnwindSafe for RISCVToken<'a>
impl<'a> Send for RISCVToken<'a>
impl<'a> Sync for RISCVToken<'a>
impl<'a> Unpin for RISCVToken<'a>
impl<'a> UnwindSafe for RISCVToken<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request