#[non_exhaustive]pub enum SyntaxKind {
Show 66 variants
Annotation,
Argument,
ArgumentList,
ArrayInitializer,
Assignment,
Attribute,
AwaitExpression,
BinaryOperation,
Break,
CatchClause,
CatchDeclaration,
Class,
ClassBody,
Comment,
Continue,
Declaration,
DeclarationBlock,
Default,
DoStatement,
ElementAccess,
ElseClause,
ExecutionBlock,
Export,
ExpressionStatement,
File,
FinallyClause,
ForEachStatement,
ForStatement,
If,
Import,
JsxElement,
LambdaFunctionType,
Literal,
MemberAccess,
Metadata,
MethodDeclaration,
MethodInvocation,
MissingNode,
Modifiers,
ModuleImport,
NamedArgument,
Namespace,
NewExpression,
Object,
ObjectCreation,
Pair,
Parameter,
ParameterList,
ParenthesizedExpression,
ReservedWord,
RestPattern,
Return,
Selector,
SpreadElement,
SwitchBody,
SwitchSection,
SwitchStatement,
SymbolLookup,
TernaryOperation,
This,
ThrowStatement,
TryStatement,
UnaryExpression,
UsingStatement,
VariableDeclaration,
WhileStatement,
}Expand description
Auto-generated discriminant enum variants
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Annotation
A decorator/annotation applied to a declaration.
Argument
A single call argument.
ArgumentList
A call’s argument list.
ArrayInitializer
An array literal initializer.
Assignment
An assignment expression.
Attribute
An attribute applied to a declaration (non-annotation form).
AwaitExpression
An await expression.
BinaryOperation
A binary operator expression.
Break
A break statement.
CatchClause
A catch clause of a try statement.
CatchDeclaration
The exception variable declared by a catch clause.
Class
A class declaration.
ClassBody
A class’s member list.
Comment
A source comment.
Continue
A continue statement.
Declaration
A generic (language-agnostic) declaration.
DeclarationBlock
A block holding one or more declarations.
Default
A default label or value.
DoStatement
A do/while loop.
ElementAccess
An indexed element access (e.g. a[i]).
ElseClause
The else branch of a conditional.
ExecutionBlock
A block of executable statements.
Export
An export statement.
ExpressionStatement
A statement that is a bare expression.
File
The file’s root node.
FinallyClause
The finally clause of a try statement.
ForEachStatement
A for-each/for-in loop.
ForStatement
A classic C-style for loop.
If
An if conditional.
Import
An import statement.
JsxElement
A JSX element.
LambdaFunctionType
A lambda/closure’s declared type.
Literal
A literal value.
MemberAccess
A member access expression (e.g. a.b).
Metadata
A file’s top-level metadata: structure, instances and imports.
MethodDeclaration
A method or function declaration.
MethodInvocation
A method or function call.
MissingNode
A node the grammar could not classify.
Modifiers
A declaration’s modifier list (e.g. public static).
ModuleImport
A whole-module import.
NamedArgument
A call argument passed by name.
Namespace
A namespace/module declaration.
NewExpression
An object-construction expression (new X(...)).
Object
An object literal or reference (e.g. a Terraform resource block).
ObjectCreation
An object instantiation with an initializer.
Pair
A key/value pair (e.g. in a map or object literal).
Parameter
A function/method parameter.
ParameterList
A function/method’s parameter list.
ParenthesizedExpression
A parenthesized expression.
ReservedWord
A language reserved word used as a value (e.g. self).
RestPattern
A rest/spread binding pattern (e.g. ...rest).
Return
A return statement.
Selector
A Go-style type selector.
SpreadElement
A spread element in a call or literal (e.g. ...xs).
SwitchBody
A switch statement’s body.
SwitchSection
One case/when section of a switch.
SwitchStatement
A switch statement.
SymbolLookup
A bare symbol reference.
TernaryOperation
A ternary conditional expression (a ? b : c).
This
A this/self reference.
ThrowStatement
A throw/raise statement.
TryStatement
A try statement.
UnaryExpression
A unary operator expression.
UsingStatement
A using/with resource-scoped statement.
VariableDeclaration
A variable declaration.
WhileStatement
A while loop.