Documentation ¶
Index ¶
Constants ¶
View Source
const ( INTEGER_OBJ = "INTEGER" BOOLEAN_OBJ = "BOOLEAN" NULL_OBJ = "NULL" RETURN_OBJ = "RETURN" ERROR_OBJ = "ERROR" FUNC_OBJ = "FUNCTION" BUILT_IN_OBJ = "BUILT_IN" STRING_OBJ = "STRING" ARRAY_OBJ = "ARRAY" HASH_MAP_OBJ = "HASH_MAP" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Elements []Object
}
func (*Array) Type ¶
func (a *Array) Type() ObjectType
type Boolean ¶
type Boolean struct {
Value bool
}
func (*Boolean) Type ¶
func (b *Boolean) Type() ObjectType
type BuiltInFunction ¶
func (*BuiltInFunction) Inspect ¶
func (fn *BuiltInFunction) Inspect() string
func (*BuiltInFunction) Type ¶
func (fn *BuiltInFunction) Type() ObjectType
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnclosedEnv ¶
func NewEnclosedEnv(outer *Environment) *Environment
func NewEnvironment ¶
func NewEnvironment() *Environment
type Error ¶
type Error struct {
Message string
}
func (*Error) Type ¶
func (err *Error) Type() ObjectType
type Function ¶
type Function struct { Parameters []*ast.Identifier Body *ast.BlockStatement Env *Environment }
func (*Function) Type ¶
func (fn *Function) Type() ObjectType
type HashKey ¶
type HashKey struct { Type ObjectType Value int64 }
type HashMap ¶
type HashMap struct { // HashPair is used as value to keep track of non-hash representation of keys Pairs map[HashKey]HashPair }
func (*HashMap) Type ¶
func (hm *HashMap) Type() ObjectType
type Integer ¶
type Integer struct {
Value int64
}
func (*Integer) Type ¶
func (i *Integer) Type() ObjectType
type Object ¶
type Object interface { Type() ObjectType Inspect() string }
type ObjectType ¶
type ObjectType string
type ReturnWrapper ¶
type ReturnWrapper struct {
Value Object
}
func (*ReturnWrapper) Inspect ¶
func (rw *ReturnWrapper) Inspect() string
func (*ReturnWrapper) Type ¶
func (rw *ReturnWrapper) Type() ObjectType
Click to show internal directories.
Click to hide internal directories.