Represents an access expression in the AST.
It includes accessing a field or indexing into a collection.
Represents an assignment expression in the AST.
An assignment binds a value to a variable.
Represents the Abstract Syntax Tree (AST) for the language.
Represents a binary operator in the AST.
Represents a binary expression in the AST.
A binary expression consists of two operands and an operator (e.g., a + b).
Represents a block of statements enclosed in braces in the AST.
Represents a function call in the AST.
It consists of a function name (callee) and a list of arguments.
Represents a diagnostic message, which includes information about an error or warning
and can be pretty-printed to the console.
Represents an else or else if block in the AST.
Represents a function declaration in the AST.
Represents a function parameter in the AST.
Represents a function type annotation in the AST.
Represents an if statement in the AST.
Represents a variable declaration (let statement) in the AST.
The lexer is responsible for converting the source code into a list of tokens.
Represents a literal expression in the AST.
It consists of a token and a specific literal value (e.g., integer, string).
Represents an object expression in the AST.
Represents a parenthesized expression in the AST.
Parenthesized expressions are used to override operator precedence.
A parser that converts a list of tokens into an Abstract Syntax Tree (AST).
Represents a return statement in the AST.
Spread operator for variadic arguments.
Represents a struct constructor expression in the AST.
Represents a span of text between two positions, including the literal text.
Represents a then-else expression in the AST.
Represents a try statement in the AST.
Represents a type annotation in the AST.
Represents a unary operator in the AST.
Represents a unary expression in the AST.
Unary expressions operate on a single operand (e.g., -a).
Represents a use statement for importing modules or items in the AST.
Represents a variable in the AST.
A variable refers to a named entity in the program.
Represents a collection of expressions as a vector.
Used to handle lists of expressions, such as arrays or argument lists.