Documentation ¶
Index ¶
Constants ¶
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BuildIn ¶
type BuildIn struct {
Fn BuildInFunction
}
BuildIn represents a wrapper around BuildInFunction that implements Object interface.
type BuildInFunction ¶
BuildInFunction represents build-in function definition.
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
Environment represents a local environment that keeps track of identifiers and their values within a session.
func NewEnclosedEnvironment ¶
func NewEnclosedEnvironment(outer *Environment) *Environment
NewEnclosedEnvironment returns new instance of Environment which enclosing the new environment.
func NewEnvironment ¶
func NewEnvironment() *Environment
NewEnvironment return new instance of Environment.
type Function ¶
type Function struct { Parameters []*ast.Identifier Body *ast.BlockStatement Env *Environment }
Function represents a function.
type Hashable ¶
type Hashable interface {
HashKey() HashKey
}
Hashable describes an object that can be used as a key in hash map.
type ReturnValue ¶
type ReturnValue struct {
Value Object
}
ReturnValue represents return statement value.
func (*ReturnValue) Inspect ¶
func (rv *ReturnValue) Inspect() string
func (*ReturnValue) Type ¶
func (rv *ReturnValue) Type() Type
Click to show internal directories.
Click to hide internal directories.