Enum edlang_parser::tokens::Token
source · pub enum Token {
Show 52 variants
KeywordLet,
KeywordConst,
KeywordFn,
KeywordReturn,
KeywordStruct,
KeywordIf,
KeywordElse,
KeywordWhile,
KeywordFor,
KeywordMatch,
KeywordMod,
KeywordPub,
KeywordMut,
KeywordUse,
KeywordIn,
KeywordExtern,
Identifier(String),
Integer(u128),
String(String),
Boolean(bool),
LeftParen,
RightParen,
LeftBracket,
RightBracket,
LeftSquareBracket,
RightSquareBracket,
Assign,
Semicolon,
Colon,
DoubleColon,
Arrow,
Coma,
Dot,
TwoDots,
LessThanSign,
MoreThanSign,
MoreThanEqSign,
LessThanEqSign,
OperatorAdd,
OperatorSub,
OperatorMul,
OperatorDiv,
OperatorRem,
OperatorAnd,
OperatorOr,
OperatorEq,
OperatorNe,
OperatorNot,
OperatorBitwiseNot,
OperatorBitwiseXor,
OperatorBitwiseAnd,
OperatorBitwiseOr,
}
Variants§
KeywordLet
KeywordConst
KeywordFn
KeywordReturn
KeywordStruct
KeywordIf
KeywordElse
KeywordWhile
KeywordFor
KeywordMatch
KeywordMod
KeywordPub
KeywordMut
KeywordUse
KeywordIn
KeywordExtern
Identifier(String)
Integer(u128)
String(String)
Boolean(bool)
LeftParen
RightParen
LeftBracket
RightBracket
LeftSquareBracket
RightSquareBracket
Assign
Semicolon
Colon
DoubleColon
Arrow
Coma
Dot
TwoDots
LessThanSign
MoreThanSign
MoreThanEqSign
LessThanEqSign
OperatorAdd
OperatorSub
OperatorMul
OperatorDiv
OperatorRem
OperatorAnd
OperatorOr
OperatorEq
OperatorNe
OperatorNot
OperatorBitwiseNot
OperatorBitwiseXor
OperatorBitwiseAnd
OperatorBitwiseOr
Trait Implementations§
source§impl<'s> Logos<'s> for Token
impl<'s> Logos<'s> for Token
§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 = ()
type Extras = ()
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§impl PartialEq for Token
impl PartialEq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin 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