Documentation
¶
Index ¶
Constants ¶
View Source
const ( INTEGER_OBJ = "INTEGER" BOOLEAN_OBJ = "BOOLEAN" RETURN_OBJ = "RETURN" ERROR_OBJ = "ERROR" NULL_OBJ = "NULL" FUNCTION_OBJ = "FUNCTION" STRING_OBJ = "STRING" BUILTIN_OBJ = "BUILTIN" ARRAY_OBJ = "ARRAY" HASH_OBJ = "HASH" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Elements []Object
}
func (*Array) Type ¶
func (array *Array) Type() ObjectType
type Boolean ¶
type Boolean struct {
Value bool
}
func (*Boolean) Type ¶
func (boolean *Boolean) Type() ObjectType
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment() *Environment
func NewLocalEnvironment ¶
func NewLocalEnvironment(outer *Environment) *Environment
type Error ¶
type Error struct {
Msg string
}
func (*Error) Type ¶
func (err *Error) Type() ObjectType
type Function ¶
type Function struct {
Parameters []*ast.Identifier
Body *ast.BlockStatement
// The environment in which the function was defined, This allow a closure
Env *Environment
}
func (*Function) Type ¶
func (function *Function) Type() ObjectType
type HashKey ¶
type HashKey struct {
Type ObjectType
Value uint64
}
type Integer ¶
type Integer struct {
Value int64
}
func (*Integer) Type ¶
func (integer *Integer) Type() ObjectType
type Object ¶
type Object interface {
Type() ObjectType
Inspect() string
}
type ObjectType ¶
type ObjectType string
Click to show internal directories.
Click to hide internal directories.