Versions in this module Expand all Collapse all v0 v0.0.1 Apr 12, 2024 Changes in this version + var Builtins = []struct{ ... } + type Array struct + Elements []Object + Indexes []Object + func (ao *Array) Inspect() string + func (ao *Array) Keys() []Object + func (ao *Array) Type() ObjectType + type Boolean struct + Value bool + func (b *Boolean) Inspect() string + func (b *Boolean) Type() ObjectType + type Builtin struct + Fn BuiltinFunction + func (b *Builtin) Inspect() string + func (b *Builtin) Type() ObjectType + type BuiltinFunction func(args ...Object) Object + type ByteCode struct + Constants []Object + Instructions op.Instructions + JumpTables []*JumpTable + type Closure struct + Fn *CompiledFunction + Free []Object + func (c *Closure) Inspect() string + func (c *Closure) Type() ObjectType + type CompiledFunction struct + Instructions op.Instructions + NumLocals int + NumParameters int + func (cf *CompiledFunction) Inspect() string + func (cf *CompiledFunction) Type() ObjectType + type Compiler struct + func NewCompiler() *Compiler + func NewCompilerWithState(s *SymbolTable, constants []Object) *Compiler + func (c *Compiler) Bytecode() *ByteCode + func (c *Compiler) Compile(node ast.Node) error + type Error struct + Message string + func (e *Error) Inspect() string + func (e *Error) Type() ObjectType + type HashKey struct + Type ObjectType + Value uint64 + type Hashable interface + HashKey func() HashKey + type Integer struct + Value int64 + func (i *Integer) HashKey() HashKey + func (i *Integer) Inspect() string + func (i *Integer) Type() ObjectType + type JumpTable struct + func (j *JumpTable) DefaultJump() int + func (j *JumpTable) JumpPosition(index uint64) (int, bool) + type KeysGetter interface + Keys func() []Object + type Map struct + Indexes []Object + Pairs map[HashKey]MapPair + func (m *Map) Inspect() string + func (m *Map) Keys() []Object + func (m *Map) Type() ObjectType + type MapPair struct + Key Object + Value Object + type Null struct + func (i *Null) Inspect() string + func (i *Null) Type() ObjectType + type Object interface + Inspect func() string + Type func() ObjectType + type ObjectType string + const ARRAY_OBJ + const BOOLEAN_OBJ + const BUILTIN_OBJ + const CLOSURE_OBJ + const COMPILED_FUNCTION_OBJ + const ERROR_OBJ + const INTEGER_OBJ + const MAP_OBJ + const NULL_OBJ + const STRING_OBJ + type String struct + Value string + func (s *String) HashKey() HashKey + func (s *String) Inspect() string + func (s *String) Type() ObjectType + type Symbol struct + Index int + Mutable bool + Name string + Scope SymbolScope + type SymbolScope string + const BuiltinScope + const FreeScope + const FunctionScope + const GlobalScope + const LocalScope + type SymbolTable struct + FreeSymbols []Symbol + Outer *SymbolTable + func NewEnclosedSymbolTable(outer *SymbolTable) *SymbolTable + func NewSymbolTable() *SymbolTable + func (s *SymbolTable) Define(name string, mutable bool) Symbol + func (s *SymbolTable) DefineBuiltin(index int, name string) Symbol + func (s *SymbolTable) DefineFunctionName(name string) Symbol + func (s *SymbolTable) Resolve(name string) (Symbol, bool)