pub enum TokenKind {
Show 150 variants
EndOfFile,
Unknown,
Whitespace,
LineComment,
BlockComment,
Shebang,
Identifier,
PrivateIdentifier,
NumericLiteral,
BigIntLiteral,
StringLiteral,
RegularExpressionLiteral,
NoSubstitutionTemplate,
TemplateHead,
TemplateMiddle,
TemplateTail,
KwAbstract,
KwAccessor,
KwAny,
KwAs,
KwAsserts,
KwAsync,
KwAwait,
KwBigint,
KwBoolean,
KwBreak,
KwCase,
KwCatch,
KwClass,
KwConst,
KwConstructor,
KwContinue,
KwDeclare,
KwDebugger,
KwDefault,
KwDelete,
KwDo,
KwElse,
KwEnum,
KwExport,
KwExtends,
KwFalse,
KwFinally,
KwFor,
KwFrom,
KwFunction,
KwGet,
KwIf,
KwImplements,
KwImport,
KwIn,
KwInfer,
KwInstanceof,
KwInterface,
KwIs,
KwKeyof,
KwLet,
KwNamespace,
KwNever,
KwNew,
KwNull,
KwNumber,
KwObject,
KwOf,
KwOverride,
KwPackage,
KwPrivate,
KwProtected,
KwPublic,
KwReadonly,
KwReturn,
KwSatisfies,
KwSet,
KwStatic,
KwString,
KwSuper,
KwSwitch,
KwSymbol,
KwThis,
KwThrow,
KwTrue,
KwTry,
KwType,
KwTypeof,
KwUndefined,
KwUnique,
KwUnknown,
KwVar,
KwVoid,
KwWhile,
KwWith,
KwYield,
LBrace,
RBrace,
LBracket,
RBracket,
LParen,
RParen,
Dot,
DotDotDot,
Comma,
Semicolon,
Colon,
Question,
QuestionDot,
QuestionQuestion,
At,
Arrow,
Plus,
Minus,
Star,
StarStar,
Slash,
Percent,
PlusPlus,
MinusMinus,
LessThan,
GreaterThan,
LessThanEq,
GreaterThanEq,
LessLess,
GreaterGreater,
GreaterGreaterGreater,
Eq,
EqEq,
EqEqEq,
Bang,
BangEq,
BangEqEq,
Amp,
AmpAmp,
Pipe,
PipePipe,
Caret,
Tilde,
PlusEq,
MinusEq,
StarEq,
StarStarEq,
SlashEq,
PercentEq,
LessLessEq,
GreaterGreaterEq,
GreaterGreaterGreaterEq,
AmpEq,
AmpAmpEq,
PipeEq,
PipePipeEq,
CaretEq,
QuestionQuestionEq,
}Expand description
A lexical token kind. This is intentionally separate from NodeKind.
Variants§
EndOfFile
Unknown
Whitespace
LineComment
BlockComment
Shebang
Identifier
PrivateIdentifier
NumericLiteral
BigIntLiteral
StringLiteral
RegularExpressionLiteral
NoSubstitutionTemplate
TemplateHead
TemplateMiddle
TemplateTail
KwAbstract
KwAccessor
KwAny
KwAs
KwAsserts
KwAsync
KwAwait
KwBigint
KwBoolean
KwBreak
KwCase
KwCatch
KwClass
KwConst
KwConstructor
KwContinue
KwDeclare
KwDebugger
KwDefault
KwDelete
KwDo
KwElse
KwEnum
KwExport
KwExtends
KwFalse
KwFinally
KwFor
KwFrom
KwFunction
KwGet
KwIf
KwImplements
KwImport
KwIn
KwInfer
KwInstanceof
KwInterface
KwIs
KwKeyof
KwLet
KwNamespace
KwNever
KwNew
KwNull
KwNumber
KwObject
KwOf
KwOverride
KwPackage
KwPrivate
KwProtected
KwPublic
KwReadonly
KwReturn
KwSatisfies
KwSet
KwStatic
KwString
KwSuper
KwSwitch
KwSymbol
KwThis
KwThrow
KwTrue
KwTry
KwType
KwTypeof
KwUndefined
KwUnique
KwUnknown
KwVar
KwVoid
KwWhile
KwWith
KwYield
LBrace
RBrace
LBracket
RBracket
LParen
RParen
Dot
DotDotDot
Comma
Semicolon
Colon
Question
QuestionDot
QuestionQuestion
At
Arrow
Plus
Minus
Star
StarStar
Slash
Percent
PlusPlus
MinusMinus
LessThan
GreaterThan
LessThanEq
GreaterThanEq
LessLess
GreaterGreater
GreaterGreaterGreater
Eq
EqEq
EqEqEq
Bang
BangEq
BangEqEq
Amp
AmpAmp
Pipe
PipePipe
Caret
Tilde
PlusEq
MinusEq
StarEq
StarStarEq
SlashEq
PercentEq
LessLessEq
GreaterGreaterEq
GreaterGreaterGreaterEq
AmpEq
AmpAmpEq
PipeEq
PipePipeEq
CaretEq
QuestionQuestionEq
Trait Implementations§
impl Copy for TokenKind
impl Eq for TokenKind
Source§impl From<TokenKind> for SyntaxKind
impl From<TokenKind> for SyntaxKind
Source§impl Ord for TokenKind
impl Ord for TokenKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for TokenKind
impl PartialOrd 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