Documentation
¶
Index ¶
- Constants
- type Array
- type At
- type Boolean
- type Break
- type Builtin
- type BuiltinFunction
- type Byte
- type Continue
- type Dict
- type DictPair
- type Environment
- type Error
- type File
- type Float
- type Function
- type HashKey
- type Hashable
- type Instance
- type Integer
- type Iterable
- type Module
- type ModuleFunction
- type Null
- type Object
- type ObjectType
- type Package
- type ReturnValue
- type String
- type Time
Constants ¶
View Source
const ( INTEGER_OBJ = "NAMBA" FLOAT_OBJ = "DESIMALI" BOOLEAN_OBJ = "BOOLEAN" NULL_OBJ = "TUPU" RETURN_VALUE_OBJ = "RUDISHA" ERROR_OBJ = "KOSA" FUNCTION_OBJ = "UNDO (FUNCTION)" STRING_OBJ = "NENO" BUILTIN_OBJ = "YA_NDANI" ARRAY_OBJ = "ORODHA" DICT_OBJ = "KAMUSI" CONTINUE_OBJ = "ENDELEA" BREAK_OBJ = "VUNJA" FILE_OBJ = "FAILI" TIME_OBJ = "MUDA" JSON_OBJ = "JSONI" MODULE_OBJ = "MODULE" BYTE_OBJ = "BYTE" PACKAGE_OBJ = "PAKEJI" INSTANCE = "PAKEJI" AT = "@" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct { Elements []Object // contains filtered or unexported fields }
func (*Array) Type ¶
func (ao *Array) Type() ObjectType
type Boolean ¶
type Boolean struct {
Value bool
}
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 ¶
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnclosedEnvironment ¶
func NewEnclosedEnvironment(outer *Environment) *Environment
func NewEnvironment ¶
func NewEnvironment() *Environment
func (*Environment) Del ¶
func (e *Environment) Del(name string) bool
type Error ¶
type Error struct {
Message string
}
func (*Error) Type ¶
func (e *Error) Type() ObjectType
type Float ¶
type Float struct {
Value float64
}
func (*Float) Type ¶
func (f *Float) Type() ObjectType
type Function ¶
type Function struct { Name string Parameters []*ast.Identifier Defaults map[string]ast.Expression Body *ast.BlockStatement Env *Environment }
func (*Function) Type ¶
func (f *Function) Type() ObjectType
type HashKey ¶
type HashKey struct { Type ObjectType Value uint64 }
type Instance ¶
type Instance struct { Package *Package Env *Environment }
func (*Instance) Type ¶
func (i *Instance) Type() ObjectType
type Integer ¶
type Integer struct {
Value int64
}
func (*Integer) Type ¶
func (i *Integer) Type() ObjectType
type Module ¶
type Module struct { Name string Functions map[string]ModuleFunction }
func (*Module) Type ¶
func (m *Module) Type() ObjectType
type Object ¶
type Object interface { Type() ObjectType Inspect() string }
type ObjectType ¶
type ObjectType string
type Package ¶
type Package struct { Name *ast.Identifier Env *Environment Scope *Environment }
func (*Package) Type ¶
func (p *Package) Type() ObjectType
type ReturnValue ¶
type ReturnValue struct {
Value Object
}
func (*ReturnValue) Inspect ¶
func (rv *ReturnValue) Inspect() string
func (*ReturnValue) Type ¶
func (rv *ReturnValue) Type() ObjectType
Click to show internal directories.
Click to hide internal directories.