class

Interpreter

Inherits Reference < Object

Constructors

new(program : String, file_path : String, starting_line, level : Logger::Level = Logger::Level::Warning)
Source
new(log : Logger)
Source
new(types : Hash(String, TypeDefinition) = {} of String => TypeDefinition, functions : Hash(String, Array(FunctionDef)) = {} of String => Array(FunctionDef), log : Logger = Logger.new)
Source

Class methods

run(program : String, file_path : String, starting_line, log_level : Logger::Level = Logger::Level::Warning)
Source

Instance methods

call(func : FunctionDef, type_args : Slice(Type), args : Array(Val)) : Val
Source
call(func : FunctionDef, args : Array(Val) = [] of Val) : Val
Source
eval(hir : Hir) : Val
Source
eval(hir_cell : Cell(Hir)) : Val
Source
frame
Source
functions
Source
functions=(functions : Hash(String, Array(FunctionDef)))
Source
log=(log : Logger)
Source
stack
Source
stack=(stack : Array(StackFrame))
Source
try_conditionals(conditionals : Array(Hir::TestOrBinding)) : Val | Nil
Source
types
Source
types=(types : Hash(String, TypeDefinition))
Source