Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Elements []Object
}
================================================================================================= Array
func (*Array) Type ¶
func (ao *Array) Type() ObjectType
type Boolean ¶
type Boolean struct {
Value bool
}
================================================================================================= Boolean Object
func (*Boolean) Type ¶
func (b *Boolean) Type() ObjectType
type Builtin ¶
type Builtin struct {
Fn BuiltinFunction
}
func (*Builtin) Type ¶
func (b *Builtin) Type() ObjectType
type BuiltinFunction ¶
================================================================================================= Builtin Function
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEncloedEnvironment ¶
func NewEncloedEnvironment(outer *Environment) *Environment
func NewEnvironment ¶
func NewEnvironment() *Environment
type Error ¶
type Error struct {
Message string
}
================================================================================================= Error Object
func (*Error) Type ¶
func (e *Error) Type() ObjectType
type Function ¶
type Function struct { Parameters []*ast.Identifier Body *ast.BlockStatement Env *Environment }
================================================================================================= Function Object
func (*Function) Type ¶
func (f *Function) Type() ObjectType
type HashKey ¶
type HashKey struct { Type ObjectType Value uint64 }
================================================================================================= Hash
type Integer ¶
type Integer struct {
Value int64
}
================================================================================================= Integer Object
func (*Integer) Type ¶
func (i *Integer) Type() ObjectType
type Null ¶
type Null struct{}
================================================================================================= Null Object
func (*Null) Type ¶
func (n *Null) Type() ObjectType
type Object ¶
type Object interface { Type() ObjectType Inspect() string }
type ObjectType ¶
type ObjectType string
const ( INTEGER_OBJ ObjectType = "INTEGER" BOOLEAN_OBJ ObjectType = "BOOLEAN" NULL_OBJ ObjectType = "NULL" RETURN_VALUE_OBJ ObjectType = "RETURN_VALUE" ERROR_OBJ ObjectType = "ERROR" FUNCTION_OBJ ObjectType = "FUNCTION" STRING_OBJ ObjectType = "STRING" BUILTIN_OBJ ObjectType = "BUILTIN" ARRAY_OBJ ObjectType = "ARRAY" HASH_OBJ ObjectType = "HASH" )
type ReturnValue ¶
type ReturnValue struct {
Value Object
}
================================================================================================= Return Value Object
func (*ReturnValue) Inspect ¶
func (rv *ReturnValue) Inspect() string
func (*ReturnValue) Type ¶
func (rv *ReturnValue) Type() ObjectType