Documentation
¶
Index ¶
Constants ¶
View Source
const ( INTEGER_OBJ = "INTEGER" FLOAT_OBJ = "FLOAT" BOOLEAN_OBJ = "BOOLEAN" NULL_OBJ = "NULL" RETURN_VALUE_OBJ = "RETURN_VALUE" ERROR_OBJ = "ERROR" 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 (ao *Array) Type() ObjectTypes
type Builtin ¶
type Builtin struct {
Fn BuiltinFunction
}
func (*Builtin) Type ¶
func (b *Builtin) Type() ObjectTypes
type BuiltinFunction ¶
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnclosedEnvironment ¶
func NewEnclosedEnvironment(outer *Environment) *Environment
func NewEnvironment ¶
func NewEnvironment() *Environment
type Error ¶
type Error struct {
Message string
}
func (*Error) Type ¶
func (e *Error) Type() ObjectTypes
type Float ¶ added in v0.2.0
func (*Float) Type ¶ added in v0.2.0
func (f *Float) Type() ObjectTypes
type Function ¶
type Function struct {
Name string
Token *ast.Identifier
Parameters []*ast.Identifier
Body *ast.BlockStatement
Env *Environment
}
func (*Function) Type ¶
func (f *Function) Type() ObjectTypes
type HashKey ¶
type HashKey struct {
Type ObjectTypes
Value uint64
}
type Object ¶
type Object interface {
Type() ObjectTypes
Inspect() string
}
type ObjectTypes ¶
type ObjectTypes string
type ReturnValue ¶
type ReturnValue struct {
Value Object
}
func (*ReturnValue) Inspect ¶
func (rv *ReturnValue) Inspect() string
func (*ReturnValue) Type ¶
func (rv *ReturnValue) Type() ObjectTypes
Click to show internal directories.
Click to hide internal directories.