pub enum SyntaxKind {
Show 306 variants
Trivia,
ExprList,
Arg,
ArgClauseNamed,
ArgClauseUnnamed,
ArgClauseFieldInitShorthand,
ExprFieldInitShorthand,
ArgList,
ExprMissing,
PathSegmentSimple,
OptionTerminalColonColonEmpty,
PathSegmentWithGenericArgs,
ExprPath,
ExprParenthesized,
ExprUnary,
ExprBinary,
ExprListParenthesized,
ExprFunctionCall,
ArgListParenthesized,
OptionArgListParenthesizedEmpty,
ExprStructCtorCall,
StructArgListBraced,
ExprBlock,
ExprMatch,
MatchArms,
MatchArm,
ExprIf,
ConditionLet,
ConditionExpr,
ExprLoop,
ExprWhile,
ExprFor,
ElseClause,
OptionElseClauseEmpty,
ExprErrorPropagate,
ExprIndexed,
ExprInlineMacro,
ExprFixedSizeArray,
FixedSizeArraySize,
OptionFixedSizeArraySizeEmpty,
ExprClosure,
ClosureParamWrapperNAry,
StructArgExpr,
OptionStructArgExprEmpty,
StructArgSingle,
StructArgTail,
StructArgList,
ArgListBraced,
ArgListBracketed,
WrappedArgListMissing,
PatternIdentifier,
PatternStruct,
PatternStructParamList,
PatternTuple,
PatternFixedSizeArray,
PatternList,
PatternListOr,
PatternStructParamWithExpr,
PatternEnum,
PatternEnumInnerPattern,
OptionPatternEnumInnerPatternEmpty,
TypeClause,
OptionTypeClauseEmpty,
ReturnTypeClause,
OptionReturnTypeClauseEmpty,
StatementList,
StatementMissing,
StatementLet,
OptionTerminalSemicolonEmpty,
StatementExpr,
StatementContinue,
ExprClause,
OptionExprClauseEmpty,
StatementReturn,
StatementBreak,
StatementItem,
Param,
ModifierList,
ParamList,
ImplicitsClause,
ImplicitsList,
OptionImplicitsClauseEmpty,
OptionTerminalNoPanicEmpty,
FunctionSignature,
Member,
MemberList,
Variant,
VariantList,
ModuleItemList,
ModuleItemMissing,
Attribute,
AttributeList,
VisibilityDefault,
VisibilityPubArgumentClause,
OptionVisibilityPubArgumentClauseEmpty,
VisibilityPub,
ItemModule,
ModuleBody,
FunctionDeclaration,
ItemConstant,
FunctionWithBody,
ItemExternFunction,
ItemExternType,
ItemTrait,
TraitBody,
TraitItemList,
TraitItemMissing,
TraitItemFunction,
TraitItemType,
TraitItemConstant,
TraitItemImpl,
ItemImpl,
ItemInlineMacro,
ItemHeaderDoc,
ImplBody,
ImplItemList,
ImplItemMissing,
ItemImplAlias,
ItemStruct,
ItemEnum,
ItemTypeAlias,
ItemUse,
UsePathLeaf,
UsePathSingle,
UsePathMulti,
UsePathList,
AliasClause,
OptionAliasClauseEmpty,
GenericArgNamed,
GenericArgUnnamed,
GenericArgValueExpr,
GenericArgs,
GenericArgList,
OptionWrappedGenericParamListEmpty,
WrappedGenericParamList,
GenericParamList,
GenericParamType,
GenericParamConst,
GenericParamImplNamed,
GenericParamImplAnonymous,
GenericParamNegativeImpl,
TriviumSkippedNode,
TokenIdentifier,
TerminalIdentifier,
TokenLiteralNumber,
TerminalLiteralNumber,
TokenShortString,
TerminalShortString,
TokenString,
TerminalString,
TokenAs,
TerminalAs,
TokenConst,
TerminalConst,
TokenElse,
TerminalElse,
TokenEnum,
TerminalEnum,
TokenExtern,
TerminalExtern,
TokenFalse,
TerminalFalse,
TokenFunction,
TerminalFunction,
TokenIf,
TerminalIf,
TokenWhile,
TerminalWhile,
TokenFor,
TerminalFor,
TokenLoop,
TerminalLoop,
TokenImpl,
TerminalImpl,
TokenImplicits,
TerminalImplicits,
TokenLet,
TerminalLet,
TokenMatch,
TerminalMatch,
TokenModule,
TerminalModule,
TokenMut,
TerminalMut,
TokenNoPanic,
TerminalNoPanic,
TokenOf,
TerminalOf,
TokenRef,
TerminalRef,
TokenContinue,
TerminalContinue,
TokenReturn,
TerminalReturn,
TokenBreak,
TerminalBreak,
TokenStruct,
TerminalStruct,
TokenTrait,
TerminalTrait,
TokenTrue,
TerminalTrue,
TokenType,
TerminalType,
TokenUse,
TerminalUse,
TokenPub,
TerminalPub,
TokenAnd,
TerminalAnd,
TokenAndAnd,
TerminalAndAnd,
TokenArrow,
TerminalArrow,
TokenAt,
TerminalAt,
TokenBadCharacters,
TerminalBadCharacters,
TokenColon,
TerminalColon,
TokenColonColon,
TerminalColonColon,
TokenComma,
TerminalComma,
TokenDiv,
TerminalDiv,
TokenDivEq,
TerminalDivEq,
TokenDot,
TerminalDot,
TokenDotDot,
TerminalDotDot,
TokenEndOfFile,
TerminalEndOfFile,
TokenEq,
TerminalEq,
TokenEqEq,
TerminalEqEq,
TokenGE,
TerminalGE,
TokenGT,
TerminalGT,
TokenHash,
TerminalHash,
TokenLBrace,
TerminalLBrace,
TokenLBrack,
TerminalLBrack,
TokenLE,
TerminalLE,
TokenLParen,
TerminalLParen,
TokenLT,
TerminalLT,
TokenMatchArrow,
TerminalMatchArrow,
TokenMinus,
TerminalMinus,
TokenMinusEq,
TerminalMinusEq,
TokenMod,
TerminalMod,
TokenModEq,
TerminalModEq,
TokenMul,
TerminalMul,
TokenMulEq,
TerminalMulEq,
TokenNeq,
TerminalNeq,
TokenNot,
TerminalNot,
TokenBitNot,
TerminalBitNot,
TokenOr,
TerminalOr,
TokenOrOr,
TerminalOrOr,
TokenPlus,
TerminalPlus,
TokenPlusEq,
TerminalPlusEq,
TokenQuestionMark,
TerminalQuestionMark,
TokenRBrace,
TerminalRBrace,
TokenRBrack,
TerminalRBrack,
TokenRParen,
TerminalRParen,
TokenSemicolon,
TerminalSemicolon,
TokenUnderscore,
TerminalUnderscore,
TokenXor,
TerminalXor,
SyntaxFile,
TokenEmpty,
TerminalEmpty,
TokenSingleLineComment,
TokenSingleLineInnerComment,
TokenSingleLineDocComment,
TokenWhitespace,
TokenNewline,
TokenMissing,
TokenSkipped,
}
Variants§
Trivia
ExprList
Arg
ArgClauseNamed
ArgClauseUnnamed
ArgClauseFieldInitShorthand
ExprFieldInitShorthand
ArgList
ExprMissing
PathSegmentSimple
OptionTerminalColonColonEmpty
PathSegmentWithGenericArgs
ExprPath
ExprParenthesized
ExprUnary
ExprBinary
ExprListParenthesized
ExprFunctionCall
ArgListParenthesized
OptionArgListParenthesizedEmpty
ExprStructCtorCall
StructArgListBraced
ExprBlock
ExprMatch
MatchArms
MatchArm
ExprIf
ConditionLet
ConditionExpr
ExprLoop
ExprWhile
ExprFor
ElseClause
OptionElseClauseEmpty
ExprErrorPropagate
ExprIndexed
ExprInlineMacro
ExprFixedSizeArray
FixedSizeArraySize
OptionFixedSizeArraySizeEmpty
ExprClosure
ClosureParamWrapperNAry
StructArgExpr
OptionStructArgExprEmpty
StructArgSingle
StructArgTail
StructArgList
ArgListBraced
ArgListBracketed
WrappedArgListMissing
PatternIdentifier
PatternStruct
PatternStructParamList
PatternTuple
PatternFixedSizeArray
PatternList
PatternListOr
PatternStructParamWithExpr
PatternEnum
PatternEnumInnerPattern
OptionPatternEnumInnerPatternEmpty
TypeClause
OptionTypeClauseEmpty
ReturnTypeClause
OptionReturnTypeClauseEmpty
StatementList
StatementMissing
StatementLet
OptionTerminalSemicolonEmpty
StatementExpr
StatementContinue
ExprClause
OptionExprClauseEmpty
StatementReturn
StatementBreak
StatementItem
Param
ModifierList
ParamList
ImplicitsClause
ImplicitsList
OptionImplicitsClauseEmpty
OptionTerminalNoPanicEmpty
FunctionSignature
Member
MemberList
Variant
VariantList
ModuleItemList
ModuleItemMissing
Attribute
AttributeList
VisibilityDefault
VisibilityPubArgumentClause
OptionVisibilityPubArgumentClauseEmpty
VisibilityPub
ItemModule
ModuleBody
FunctionDeclaration
ItemConstant
FunctionWithBody
ItemExternFunction
ItemExternType
ItemTrait
TraitBody
TraitItemList
TraitItemMissing
TraitItemFunction
TraitItemType
TraitItemConstant
TraitItemImpl
ItemImpl
ItemInlineMacro
ItemHeaderDoc
ImplBody
ImplItemList
ImplItemMissing
ItemImplAlias
ItemStruct
ItemEnum
ItemTypeAlias
ItemUse
UsePathLeaf
UsePathSingle
UsePathMulti
UsePathList
AliasClause
OptionAliasClauseEmpty
GenericArgNamed
GenericArgUnnamed
GenericArgValueExpr
GenericArgs
GenericArgList
OptionWrappedGenericParamListEmpty
WrappedGenericParamList
GenericParamList
GenericParamType
GenericParamConst
GenericParamImplNamed
GenericParamImplAnonymous
GenericParamNegativeImpl
TriviumSkippedNode
TokenIdentifier
TerminalIdentifier
TokenLiteralNumber
TerminalLiteralNumber
TokenShortString
TerminalShortString
TokenString
TerminalString
TokenAs
TerminalAs
TokenConst
TerminalConst
TokenElse
TerminalElse
TokenEnum
TerminalEnum
TokenExtern
TerminalExtern
TokenFalse
TerminalFalse
TokenFunction
TerminalFunction
TokenIf
TerminalIf
TokenWhile
TerminalWhile
TokenFor
TerminalFor
TokenLoop
TerminalLoop
TokenImpl
TerminalImpl
TokenImplicits
TerminalImplicits
TokenLet
TerminalLet
TokenMatch
TerminalMatch
TokenModule
TerminalModule
TokenMut
TerminalMut
TokenNoPanic
TerminalNoPanic
TokenOf
TerminalOf
TokenRef
TerminalRef
TokenContinue
TerminalContinue
TokenReturn
TerminalReturn
TokenBreak
TerminalBreak
TokenStruct
TerminalStruct
TokenTrait
TerminalTrait
TokenTrue
TerminalTrue
TokenType
TerminalType
TokenUse
TerminalUse
TokenPub
TerminalPub
TokenAnd
TerminalAnd
TokenAndAnd
TerminalAndAnd
TokenArrow
TerminalArrow
TokenAt
TerminalAt
TokenBadCharacters
TerminalBadCharacters
TokenColon
TerminalColon
TokenColonColon
TerminalColonColon
TokenComma
TerminalComma
TokenDiv
TerminalDiv
TokenDivEq
TerminalDivEq
TokenDot
TerminalDot
TokenDotDot
TerminalDotDot
TokenEndOfFile
TerminalEndOfFile
TokenEq
TerminalEq
TokenEqEq
TerminalEqEq
TokenGE
TerminalGE
TokenGT
TerminalGT
TokenHash
TerminalHash
TokenLBrace
TerminalLBrace
TokenLBrack
TerminalLBrack
TokenLE
TerminalLE
TokenLParen
TerminalLParen
TokenLT
TerminalLT
TokenMatchArrow
TerminalMatchArrow
TokenMinus
TerminalMinus
TokenMinusEq
TerminalMinusEq
TokenMod
TerminalMod
TokenModEq
TerminalModEq
TokenMul
TerminalMul
TokenMulEq
TerminalMulEq
TokenNeq
TerminalNeq
TokenNot
TerminalNot
TokenBitNot
TerminalBitNot
TokenOr
TerminalOr
TokenOrOr
TerminalOrOr
TokenPlus
TerminalPlus
TokenPlusEq
TerminalPlusEq
TokenQuestionMark
TerminalQuestionMark
TokenRBrace
TerminalRBrace
TokenRBrack
TerminalRBrack
TokenRParen
TerminalRParen
TokenSemicolon
TerminalSemicolon
TokenUnderscore
TerminalUnderscore
TokenXor
TerminalXor
SyntaxFile
TokenEmpty
TerminalEmpty
TokenSingleLineComment
TokenSingleLineInnerComment
TokenSingleLineDocComment
TokenWhitespace
TokenNewline
TokenMissing
TokenSkipped
Implementations§
source§impl SyntaxKind
impl SyntaxKind
pub fn is_token(&self) -> bool
pub fn is_terminal(&self) -> bool
pub fn is_keyword_token(&self) -> bool
pub fn is_keyword_terminal(&self) -> bool
Trait Implementations§
source§impl Clone for SyntaxKind
impl Clone for SyntaxKind
source§fn clone(&self) -> SyntaxKind
fn clone(&self) -> SyntaxKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SyntaxKind
impl Debug for SyntaxKind
source§impl Display for SyntaxKind
impl Display for SyntaxKind
source§impl Hash for SyntaxKind
impl Hash for SyntaxKind
source§impl PartialEq for SyntaxKind
impl PartialEq for SyntaxKind
impl Copy for SyntaxKind
impl Eq for SyntaxKind
impl StructuralPartialEq for SyntaxKind
Auto Trait Implementations§
impl Freeze for SyntaxKind
impl RefUnwindSafe for SyntaxKind
impl Send for SyntaxKind
impl Sync for SyntaxKind
impl Unpin for SyntaxKind
impl UnwindSafe for SyntaxKind
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more