Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interpreter ¶
type Interpreter struct { Environment *environment.Environment Statements []ast.Statement }
func New ¶
func New(statements []ast.Statement) *Interpreter
func (*Interpreter) Eval ¶
func (i *Interpreter) Eval(astNode ast.AstNode) object.Object
Eval has to take in an astNode and not an ast.Statement because this function will have to run recursively and deal with ast.Expression at times.
func (*Interpreter) ExecuteBlockStatements ¶
func (i *Interpreter) ExecuteBlockStatements( statements []ast.Statement, environment *environment.Environment) object.Object
--- Utility functions This function will take in an environment as a block is scoped to it's own environment.
func (*Interpreter) IsTruthy ¶
func (i *Interpreter) IsTruthy(obj object.Object) bool
This is where it is important to define what is truthy and what is not.
func (*Interpreter) Start ¶
func (i *Interpreter) Start()
Click to show internal directories.
Click to hide internal directories.