Documentation ¶
Overview ¶
node is an abstract syntax tree (AST) node
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aton ¶
type Aton struct{ Value Type }
Aton converts a string to a number type
func (Aton) PrettyPrint ¶
type BinOp ¶
type BinOp struct { Op string // Op is the operator string Left Type // Left operand Right Type // Right operand }
BinOp is a binary operator of any kind, anything from "=", etc.
func (BinOp) PrettyPrint ¶
type Block ¶
type Block struct {
Body []Type // Body is the block body
}
Block is a code block / sequence that was in '{', '}'
func (Block) PrettyPrint ¶
type Call ¶
type Call struct { Name string // Name of the function called Arguments List // Arguments passed to the function }
Call is function call
func (Call) PrettyPrint ¶
type Error ¶
type Error struct{ Value Type }
Error converts a string to an error
func (Error) PrettyPrint ¶
type Function ¶
type Function struct { Parameters List // Parameters of the function Body Type // Body of the function }
Function is a function definition
func (Function) PrettyPrint ¶
type If ¶
type If struct { Condition Type // Condition is the condition for the if statement TrueCase Type // TrueCase is executed if condition evaluates to true }
If is a conditional construct without an else case
func (If) PrettyPrint ¶
type IfElse ¶
type IfElse struct { Condition Type // Condition is the condition for the if statement TrueCase Type // TrueCase is executed if condition evaluates to true FalseCase Type // FalseCase is executed if condition evaluates to false }
IfElse is a conditional construct
func (IfElse) PrettyPrint ¶
type IndexAt ¶
func (IndexAt) PrettyPrint ¶
type IndexFromTo ¶
type IndexFromTo struct { Ary Type // Ary is the indexed node From Type // From is the start of the range To Type // To is the end of the range }
func (IndexFromTo) PrettyPrint ¶
func (i IndexFromTo) PrettyPrint(d int)
func (IndexFromTo) Token ¶
func (u IndexFromTo) Token() string
type List ¶
type List struct {
Elems []Type // Elems are the parameters or arguments
}
List is a list of arguments or parameters depending on whether it's a function call or definition
func (List) PrettyPrint ¶
type PrettyPrinter ¶
type PrettyPrinter interface {
PrettyPrint(indent int)
}
type Return ¶
type Return struct {
Target Type // Target is the returned value
}
Return is a return statement
func (Return) PrettyPrint ¶
Click to show internal directories.
Click to hide internal directories.