pub enum Raw {
}Variants§
Newline
Ident(String)
Keyword(String)
Float(f64)
Int(i64)
Str(String)
LParen
RParen
LBracket
RBracket
LBrace
RBrace
Arrow
EqEq
NotEq
LtEq
GtEq
DollarStar
Dollar
Eq
Lt
Gt
Plus
Minus
Star
Slash
Percent
Dot
Comma
Colon
At
Pipe
Question
Trait Implementations§
Source§impl<'s> Logos<'s> for Raw
impl<'s> Logos<'s> for Raw
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>,
) -> Option<Result<Self, <Self as Logos<'s>>::Error>>
fn lex( lex: &mut Lexer<'s, Self>, ) -> Option<Result<Self, <Self as Logos<'s>>::Error>>
The heart of Logos. Called by the
Lexer. The implementation for this function
is generated by the logos-derive crate.§fn lexer(source: &'source Self::Source) -> Lexer<'source, Self> ⓘwhere
Self::Extras: Default,
fn lexer(source: &'source Self::Source) -> Lexer<'source, Self> ⓘwhere
Self::Extras: Default,
Create a new instance of a
Lexer that will produce tokens implementing
this Logos.§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.impl StructuralPartialEq for Raw
Auto Trait Implementations§
impl Freeze for Raw
impl RefUnwindSafe for Raw
impl Send for Raw
impl Sync for Raw
impl Unpin for Raw
impl UnwindSafe for Raw
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