# Functions
BuildSource transforms a source file string into a Source struct.
No description provided by the author
LineBeginning returns the part of a line directly before LocationRange for example: local x = foo() ^^^^^ <- LocationRange loc then local x = foo() ^^^^^^^^^^ <- lineBeginning(loc).
LineEnding returns the part of a line directly after LocationRange for example: local x = foo() + test ^^^^^ <- LocationRange loc then local x = foo() + test ^^^^^^^ <- lineEnding(loc).
LocationRangeBetween returns a LocationRange containing both a and b.
MakeLocationRange creates a LocationRange.
MakeLocationRangeMessage creates a pseudo-LocationRange with a message but no location information.
NewIdentifierSet creates and returns a reference to an empty set.
NewNodeBase creates a new NodeBase from initial LocationRange and Identifiers.
NewNodeBaseLoc creates a new NodeBase from an initial LocationRange.
ObjectFieldLocalNoMethod creates a non-method local object field.
# Constants
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
Binary operators.
assert expr2 [: expr3] where expr3 can be nil.
'['expr1']':[:[:]] expr2.
f:: e.
id:[:[:]] expr2.
f: e.
expr1:[:[:]] expr2.
f::: e.
local id = expr2.
null '['expr1']'.
null id.
null expr1.
Literal string kinds.
Literal string kinds.
Literal string kinds.
Unary operators.
Unary operators.
Unary operators.
Unary operators.
Literal string kinds.
Literal string kinds.
# Structs
Apply represents a function call.
ApplyBrace represents e { }.
Arguments represents positional and named arguments to a function call f(x, y, z=1).
Array represents array constructors [1, 2, 3].
ArrayComp represents array comprehensions (which are like Python list comprehensions).
Assert represents an assert expression (not an object-level assert).
Binary represents binary operators.
Conditional represents if/then/else.
DesugaredObject represents object constructors { f: e ..
DesugaredObjectField represents a desugared object field.
Dollar represents the $ keyword.
Error represents the error e.
ForSpec represents a for-specification in a comprehension.
Function represents a function definition.
IfSpec represents an if-specification in a comprehension.
Import represents import "file".
ImportStr represents importstr "file".
Index represents both e[e] and the syntax sugar e.f.
InSuper represents the e in super construct.
LiteralBoolean represents true and false.
LiteralNull represents the null keyword.
LiteralNumber represents a JSON number.
LiteralString represents a JSON string.
Local represents local x = e; e.
LocalBind is a helper struct for astLocal.
Location represents a single location in an (unspecified) file.
LocationRange represents a range of a source file.
NamedArgument represents a named argument to function call x=1.
NamedParameter represents an optional named parameter of a function.
NodeBase holds fields common to all node types.
Object represents object constructors { f: e ..
ObjectComp represents object comprehension { [e]: e for x in e for.
ObjectField represents a field of an object or object comprehension.
Parameters represents the required positional parameters and optional named parameters to a function definition.
Parens represents parentheses ( e ).
Self represents the self keyword.
Slice represents an array slice a[begin:end:step].
Source represents a source file.
SourceProvider represents a source provider.
SuperIndex represents the super[e] and super.f constructs.
Unary represents unary operators.
Var represents variables.
# Interfaces
Node represents a node in the AST.
# Type aliases
BinaryOp represents a binary operator.
DesugaredObjectFields represents a DesugaredObjectField slice.
Identifier represents a variable / parameter / field name.+gen set.
Identifiers represents an Identifier slice.
IdentifierSet is the primary type that represents a set.
LiteralStringKind represents the kind of a literal string.
LocalBinds represents a LocalBind slice.
Nodes represents a Node slice.
ObjectFieldHide represents the visibility of an object field.
ObjectFieldKind represents the kind of an object field.
ObjectFields represents an ObjectField slice.
UnaryOp represents a unary operator.