pub enum TokenKind {
Show 38 variants
Ident,
Number,
String,
Directive,
RulePrefixMarker,
At,
Newline,
Indent(u32),
Eof,
LParen,
RParen,
LBracket,
RBracket,
LBrace,
RBrace,
Comma,
Colon,
Dot,
Assign,
Plus,
Minus,
Star,
Slash,
Percent,
DoubleStar,
PlusAssign,
MinusAssign,
StarAssign,
SlashAssign,
PercentAssign,
DoubleStarAssign,
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
LexBang,
}Expand description
The kind of a token.
Variants§
Ident
An identifier or keyword (keywords are resolved by the parser).
Number
A numeric literal (text holds the source spelling).
String
A string literal (text holds the unescaped value).
Directive
A #! directive line (text holds everything after #!).
RulePrefixMarker
A preprocessing marker carrying the rule-prefix state active at the following top-level rule or subroutine.
At
@Event / @Condition / other @ directives.
Newline
Indent(u32)
Indentation change: the column of the current line.
Eof
End of file.
LParen
RParen
LBracket
RBracket
LBrace
RBrace
Comma
Colon
Dot
Assign
Plus
Minus
Star
Slash
Percent
DoubleStar
PlusAssign
MinusAssign
StarAssign
SlashAssign
PercentAssign
DoubleStarAssign
Eq
Ne
Lt
Le
Gt
Ge
LexBang
A bare ! that is not !=; the parser rejects it as unsupported OPY.
Trait Implementations§
impl Copy for TokenKind
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