Expand description
The collection of nodes used for the Lua abstract syntax tree.
Structs§
- Array
Type - Represents an array type annotation (e.g.
{ ElementType }
). - Array
Type Tokens - Contains the tokens that define the array type syntax.
- Assign
Statement - Represents a variable assignment statement (e.g.,
a, b = 1, 2
). - Assign
Tokens - Tokens associated with an assignment statement.
- Binary
Expression - Represents a binary operation in expressions.
- Binary
Number - Represents a binary number.
- Block
- Represents a block, a collection of
Statement
s that can end with aLastStatement
. - Block
Tokens - Represents the tokens associated with a Lua code block, maintaining syntax information like semicolons that separate statements.
- Compound
Assign Statement - Represents a compound assignment statement (e.g.,
a += 1
). - Compound
Assign Tokens - Tokens associated with a compound assignment statement.
- Decimal
Number - Represents a decimal number.
- DoStatement
- Represents a do statement (e.g.,
do ... end
). - DoTokens
- Tokens associated with a do statement.
- Else
IfExpression Branch - Represents an elseif branch in an if expression.
- Else
IfExpression Branch Tokens - Contains token information for an elseif branch in an if expression.
- Expression
Type - Represents a
typeof(expression)
type annotation. - Expression
Type Tokens - Contains the tokens that define the
typeof
expression syntax. - Field
Expression - Represents a field access expression.
- Function
Argument Type - Represents a single argument in a function type annotation.
- Function
Body Tokens - Represents the token information associated with a function body.
- Function
Call - Represents a function call expression (e.g.,
func()
,obj:method()
,a.b.c()
). - Function
Call Tokens - Tokens associated with a function call.
- Function
Expression - Represents a function expression.
- Function
Name - Represents the name portion of a function statement.
- Function
Name Tokens - Tokens associated with a function name.
- Function
Statement - Represents a function declaration statement.
- Function
Type - Represents a function type annotation in Luau.
- Function
Type Tokens - Represents the tokens associated with a function type annotation.
- Generic
ForStatement - Represents a generic for loop statement.
- Generic
ForTokens - Tokens associated with a generic for statement.
- Generic
Parameter Iterator Generic - A utility struct to create iterators over generic parameters.
- Generic
Parameters - Represents generic parameters in a function or type declaration.
- Generic
Parameters Tokens - Contains the tokens that define the generic parameters syntax.
- Generic
Parameters With Defaults - Represents a collection of generic parameters that may include default values.
- Generic
Type Pack - Represents a generic type pack.
- Generic
Type Pack With Default - 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.
- IfBranch
Tokens - Tokens associated with an if branch.
- IfExpression
- Represents an if expression.
- IfExpression
Tokens - Contains token information for an if expression.
- IfStatement
- Represents an if statement.
- IfStatement
Tokens - Tokens associated with an if statement.
- Index
Expression - Represents a table index access expression.
- Index
Expression Tokens - Contains token information for an index expression.
- Interpolated
String Expression - Represents an interpolated string expression.
- Interpolated
String Tokens - Contains token information for an interpolated string expression.
- Intersection
Type - Represents an intersection type annotation.
- Intersection
Type Tokens - Contains the tokens that define the intersection type syntax.
- Local
Assign Statement - Represents a local variable assignment statement.
- Local
Assign Tokens - Tokens associated with a local variable assignment statement.
- Local
Function Statement - Represents a local function declaration statement.
- Local
Function Tokens - Tokens associated with a local function statement.
- Numeric
ForStatement - Represents a numeric for loop statement.
- Numeric
ForTokens - Tokens associated with a numeric for statement.
- Optional
Type - Represents an optional type annotation.
- Parenthese
Expression - Represents a parenthesized expression.
- Parenthese
Tokens - Contains token information for a parenthesized expression.
- Parenthese
Type - Represents a parenthesized type annotation.
- Parenthese
Type Tokens - Contains the tokens that define the parenthesized type syntax.
- Repeat
Statement - Represents a repeat loop statement.
- Repeat
Tokens - Tokens associated with a repeat statement.
- Return
Statement - Represents a return statement.
- Return
Tokens - Tokens associated with a return statement.
- String
Error - Represents an error that occurred while parsing a string.
- String
Expression - Represents a string literal in Lua source code.
- String
Segment - Represents a string segment in an interpolated string.
- String
Type - Represents a string literal used in type annotations.
- Table
Expression - Represents a table expression.
- Table
Field Entry - Represents a field entry in a table literal where the key is an identifier.
- Table
Index Entry - Represents an index entry in a table literal where the key is a computed expression.
- Table
Index Entry Tokens - Contains tokens for a table index entry.
- Table
Index Type Tokens - Contains the tokens that define an indexer’s syntax.
- Table
Indexer Type - Represents an indexer in a table type annotation.
- Table
Literal Property Type - Represents a string literal property in a table type annotation (i.e.
["key"]: Type
). - Table
Property Type - Represents a named property in a table type annotation (i.e.
name: Type
). - Table
Tokens - Contains tokens for a table expression.
- Table
Type - Represents a table type annotation.
- Table
Type Tokens - 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.
- Tuple
Arguments - Represents a list of arguments enclosed in parentheses.
- Tuple
Arguments Tokens - Tokens associated with tuple arguments.
- Type
Cast Expression - Represents a type cast expression.
- Type
Declaration Statement - Represents a type declaration statement.
- Type
Declaration Tokens - Tokens associated with a type declaration statement.
- Type
Field - Represents a field access on a type.
- Type
Name - Represents a named type.
- Type
Pack - Represents a pack of types.
- Type
Pack Tokens - Contains the tokens that define the type pack syntax.
- Type
Parameters - Represents a collection of type parameters in a generic type.
- Type
Parameters Tokens - Contains the tokens that define the type parameters syntax.
- Type
Variable With Default - Represents a type variable with a default value.
- Typed
Identifier - Represents an identifier with an optional type annotation.
- Unary
Expression - Represents a unary operation applied to an expression.
- Union
Type - Represents a union type annotation.
- Union
Type Tokens - Contains the tokens that define the union type syntax.
- Value
Segment - Represents an expression segment in an interpolated string.
- Value
Segment Tokens - Contains token information for a value segment in an interpolated string.
- Variadic
Type Pack - Represents a variadic type pack in Luau.
- While
Statement - Represents a while loop statement.
- While
Tokens - Tokens associated with a while statement.
Enums§
- Arguments
- Represents the different ways arguments can be passed to a function call.
- Binary
Operator - Represents binary operators used in a binary expression.
- Compound
Operator - Represents compound assignment operators (e.g.,
+=
,-=
, etc.). - Expression
- Represents all possible expressions.
- Function
Return Type - Represents the return type of a function type annotation.
- Function
Variadic Type - Represents a variadic type in a function signature.
- Generic
Parameter - Represents a generic parameter in a type or function signature.
- Generic
Parameter MutRef - A mutable reference to a generic parameter.
- Generic
Parameter Ref - A reference to a generic parameter.
- Generic
Type Pack Default - Represents the default value for a generic type pack.
- Interpolation
Segment - Represents a segment in an interpolated string.
- Last
Statement - Represents a statement that can appear as the last statement in a block.
- Number
Expression - Represents a numeric literal expression.
- Number
Parsing Error - 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.
- Table
Entry - Represents a single entry in a table literal.
- Table
Entry Type - Represents an entry in a table type annotation.
- Trivia
Kind - An enum to represent source code text.
- Type
- Represents a type annotation in Luau.
- Type
Parameter - Represents a type parameter in a generic type.
- Unary
Operator - Represents the type of operator in a unary expression.
- Variable
- Represents a variable reference.
- Variadic
Argument Type - Represents a variadic argument type in a function annotation.
Traits§
- Into
LuaString Value - Trait for converting string related values into a Lua string value.