pub enum TokenKind {
Show 20 variants
Ident(VarName),
KwLet,
KwIn,
KwFix,
KwRef,
KwExtend,
KwThrow,
KwTry,
KwCatch,
Lambda,
Dot,
Equals,
LParen,
RParen,
LBrace,
RBrace,
Comma,
Bang,
Assign,
Semicolon,
}Expand description
The syntactic kind of a token.
Variants§
Ident(VarName)
An identifier that is not a reserved keyword.
KwLet
The let keyword.
KwIn
The in keyword.
KwFix
The fix keyword.
KwRef
The ref keyword (allocation prefix).
KwExtend
The extend keyword (prototype-bearing object literal).
KwThrow
The throw keyword.
KwTry
The try keyword.
KwCatch
The catch keyword.
Lambda
A lambda head, written \.
Dot
A dot .. Used both as the lambda head separator and as the field
access infix; the parser distinguishes by syntactic position.
Equals
An equals sign = (let-binding or property assignment in a literal).
LParen
An opening parenthesis (.
RParen
A closing parenthesis ).
LBrace
An opening brace {.
RBrace
A closing brace }.
Comma
A comma , (separator inside object literals).
Bang
A bang ! (dereference prefix).
Assign
An assignment :=.
Semicolon
A semicolon ; (sequencing).
Trait Implementations§
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