pub enum TokenKind {
Keyword,
String,
Number,
Comment,
Punctuation,
Operator,
Identifier,
Property,
Type,
Function,
Default,
}Expand description
Token types for syntax highlighting.
Variants§
Keyword
Keywords: let, fn, if, for, true, false, null
String
String literals: “hello”, ‘c’
Number
Numeric literals: 42, 3.14
Comment
Comments: // comment, /* block */
Punctuation
Operator
Operators: = + - * / < > !
Identifier
Variable names
Property
JSON keys, struct fields
Type
Type names
Function
Function names
Default
Fallback - uses default code color
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