Module nodes

Module nodes 

Source
Expand description

The collection of nodes used for the Lua abstract syntax tree.

Structs§

ArrayType
Represents an array type annotation (e.g. { ElementType }).
ArrayTypeTokens
Contains the tokens that define the array type syntax.
AssignStatement
Represents a variable assignment statement (e.g., a, b = 1, 2).
AssignTokens
Tokens associated with an assignment statement.
BinaryExpression
Represents a binary operation in expressions.
BinaryNumber
Represents a binary number.
Block
Represents a block, a collection of Statements that can end with a LastStatement.
BlockTokens
Represents the tokens associated with a Lua code block, maintaining syntax information like semicolons that separate statements.
CompoundAssignStatement
Represents a compound assignment statement (e.g., a += 1).
CompoundAssignTokens
Tokens associated with a compound assignment statement.
DecimalNumber
Represents a decimal number.
DoStatement
Represents a do statement (e.g., do ... end).
DoTokens
Tokens associated with a do statement.
ElseIfExpressionBranch
Represents an elseif branch in an if expression.
ElseIfExpressionBranchTokens
Contains token information for an elseif branch in an if expression.
ExpressionType
Represents a typeof(expression) type annotation.
ExpressionTypeTokens
Contains the tokens that define the typeof expression syntax.
FieldExpression
Represents a field access expression.
FunctionArgumentType
Represents a single argument in a function type annotation.
FunctionBodyTokens
Represents the token information associated with a function body.
FunctionCall
Represents a function call expression (e.g., func(), obj:method(), a.b.c()).
FunctionCallTokens
Tokens associated with a function call.
FunctionExpression
Represents a function expression.
FunctionName
Represents the name portion of a function statement.
FunctionNameTokens
Tokens associated with a function name.
FunctionStatement
Represents a function declaration statement.
FunctionType
Represents a function type annotation in Luau.
FunctionTypeTokens
Represents the tokens associated with a function type annotation.
GenericForStatement
Represents a generic for loop statement.
GenericForTokens
Tokens associated with a generic for statement.
GenericParameterIteratorGeneric
A utility struct to create iterators over generic parameters.
GenericParameters
Represents generic parameters in a function or type declaration.
GenericParametersTokens
Contains the tokens that define the generic parameters syntax.
GenericParametersWithDefaults
Represents a collection of generic parameters that may include default values.
GenericTypePack
Represents a generic type pack.
GenericTypePackWithDefault
Represents a generic type pack with a default value.
HexNumber
Represents a hexadecimal number.
Identifier
Represents an identifier (variable name).
IfBranch
Represents a conditional branch in an if statement.
IfBranchTokens
Tokens associated with an if branch.
IfExpression
Represents an if expression.
IfExpressionTokens
Contains token information for an if expression.
IfStatement
Represents an if statement.
IfStatementTokens
Tokens associated with an if statement.
IndexExpression
Represents a table index access expression.
IndexExpressionTokens
Contains token information for an index expression.
InterpolatedStringExpression
Represents an interpolated string expression.
InterpolatedStringTokens
Contains token information for an interpolated string expression.
IntersectionType
Represents an intersection type annotation.
IntersectionTypeTokens
Contains the tokens that define the intersection type syntax.
LocalAssignStatement
Represents a local variable assignment statement.
LocalAssignTokens
Tokens associated with a local variable assignment statement.
LocalFunctionStatement
Represents a local function declaration statement.
LocalFunctionTokens
Tokens associated with a local function statement.
NumericForStatement
Represents a numeric for loop statement.
NumericForTokens
Tokens associated with a numeric for statement.
OptionalType
Represents an optional type annotation.
ParentheseExpression
Represents a parenthesized expression.
ParentheseTokens
Contains token information for a parenthesized expression.
ParentheseType
Represents a parenthesized type annotation.
ParentheseTypeTokens
Contains the tokens that define the parenthesized type syntax.
RepeatStatement
Represents a repeat loop statement.
RepeatTokens
Tokens associated with a repeat statement.
ReturnStatement
Represents a return statement.
ReturnTokens
Tokens associated with a return statement.
StringError
Represents an error that occurred while parsing a string.
StringExpression
Represents a string literal in Lua source code.
StringSegment
Represents a string segment in an interpolated string.
StringType
Represents a string literal used in type annotations.
TableExpression
Represents a table expression.
TableFieldEntry
Represents a field entry in a table literal where the key is an identifier.
TableIndexEntry
Represents an index entry in a table literal where the key is a computed expression.
TableIndexEntryTokens
Contains tokens for a table index entry.
TableIndexTypeTokens
Contains the tokens that define an indexer’s syntax.
TableIndexerType
Represents an indexer in a table type annotation.
TableLiteralPropertyType
Represents a string literal property in a table type annotation (i.e. ["key"]: Type).
TablePropertyType
Represents a named property in a table type annotation (i.e. name: Type).
TableTokens
Contains tokens for a table expression.
TableType
Represents a table type annotation.
TableTypeTokens
Contains the tokens that define a table type’s syntax.
Token
Represents a token in the source code with its position and associated comments or whitespaces.
Trivia
Represents a piece of trivia (whitespace or comments) in the source code.
TupleArguments
Represents a list of arguments enclosed in parentheses.
TupleArgumentsTokens
Tokens associated with tuple arguments.
TypeCastExpression
Represents a type cast expression.
TypeDeclarationStatement
Represents a type declaration statement.
TypeDeclarationTokens
Tokens associated with a type declaration statement.
TypeField
Represents a field access on a type.
TypeName
Represents a named type.
TypePack
Represents a pack of types.
TypePackTokens
Contains the tokens that define the type pack syntax.
TypeParameters
Represents a collection of type parameters in a generic type.
TypeParametersTokens
Contains the tokens that define the type parameters syntax.
TypeVariableWithDefault
Represents a type variable with a default value.
TypedIdentifier
Represents an identifier with an optional type annotation.
UnaryExpression
Represents a unary operation applied to an expression.
UnionType
Represents a union type annotation.
UnionTypeTokens
Contains the tokens that define the union type syntax.
ValueSegment
Represents an expression segment in an interpolated string.
ValueSegmentTokens
Contains token information for a value segment in an interpolated string.
VariadicTypePack
Represents a variadic type pack in Luau.
WhileStatement
Represents a while loop statement.
WhileTokens
Tokens associated with a while statement.

Enums§

Arguments
Represents the different ways arguments can be passed to a function call.
BinaryOperator
Represents binary operators used in a binary expression.
CompoundOperator
Represents compound assignment operators (e.g., +=, -=, etc.).
Expression
Represents all possible expressions.
FunctionReturnType
Represents the return type of a function type annotation.
FunctionVariadicType
Represents a variadic type in a function signature.
GenericParameter
Represents a generic parameter in a type or function signature.
GenericParameterMutRef
A mutable reference to a generic parameter.
GenericParameterRef
A reference to a generic parameter.
GenericTypePackDefault
Represents the default value for a generic type pack.
InterpolationSegment
Represents a segment in an interpolated string.
LastStatement
Represents a statement that can appear as the last statement in a block.
NumberExpression
Represents a numeric literal expression.
NumberParsingError
An error that can occur when parsing a number.
Position
Represents a position in the source code.
Prefix
Represents a prefix expression.
Statement
Represents all possible statement.
TableEntry
Represents a single entry in a table literal.
TableEntryType
Represents an entry in a table type annotation.
TriviaKind
An enum to represent source code text.
Type
Represents a type annotation in Luau.
TypeParameter
Represents a type parameter in a generic type.
UnaryOperator
Represents the type of operator in a unary expression.
Variable
Represents a variable reference.
VariadicArgumentType
Represents a variadic argument type in a function annotation.

Traits§

IntoLuaStringValue
Trait for converting string related values into a Lua string value.

Type Aliases§

GenericParameterIterator
GenericParameterMutRefIterator
GenericParameterRefIterator