pub enum Sym {
Show 30 variants
AliasWord,
UseWord,
Assign,
Pipe,
OpenParen,
CloseParen,
Sc,
PathAccess,
TwoDots,
Glob,
Optional,
Clone,
Ident,
StrLit,
BlockComment,
LineComment,
CodeBlock,
Error,
Ws,
Eof,
Token,
EntryPoint,
Program,
Rule,
Import,
Alias,
RulePipe,
RuleDecl,
IdentPath,
RuleItem,
}
Variants§
AliasWord
UseWord
Assign
Pipe
OpenParen
CloseParen
Sc
PathAccess
TwoDots
Glob
Optional
Clone
Ident
StrLit
String literal
BlockComment
Block comment
LineComment
Line comment
CodeBlock
Matches a entire function tail definition: arrow (“->”), return type and a expression
Error
Ws
Whitespace
Eof
End of file
Token
EntryPoint
Program
Rule
Import
Alias
RulePipe
RuleDecl
IdentPath
RuleItem
Trait Implementations§
Source§impl<'s> Logos<'s> for Sym
impl<'s> Logos<'s> for Sym
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.Source§impl Ord for Sym
impl Ord for Sym
Source§impl PartialOrd for Sym
impl PartialOrd for Sym
impl Copy for Sym
impl Eq for Sym
impl StructuralPartialEq for Sym
Auto Trait Implementations§
impl Freeze for Sym
impl RefUnwindSafe for Sym
impl Send for Sym
impl Sync for Sym
impl Unpin for Sym
impl UnwindSafe for Sym
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