Documentation
¶
Index ¶
- Constants
- Variables
- type Boolean
- type Break
- type Builtin
- type BuiltinFunction
- type Bytes
- type Class
- type Continue
- type Environment
- func (e *Environment) All() map[string]Object
- func (e *Environment) Del(name string) bool
- func (e *Environment) Get(name string) (Object, bool)
- func (e *Environment) GetDirectory() string
- func (e *Environment) Has(name string) bool
- func (e *Environment) Set(name string, val Object) Object
- func (e *Environment) SetDirectory(directory string)
- type Error
- type File
- type Float
- type Function
- type Handler
- type Hash
- type HashKey
- type HashPair
- type Hashable
- type Instance
- type Integer
- type Iterable
- type List
- type Module
- type ModuleFunction
- type ModuleProperty
- type Null
- type Object
- type Origin
- type Return
- type String
- type This
- type Type
Constants ¶
View Source
const ( NULL = "NULL" BOOLEAN = "BOOLEAN" INTEGER = "INTEGER" FLOAT = "FLOAT" BYTES = "BYTES" STRING = "STRING" RETURN = "RETURN" ERROR = "ERROR" FUNCTION = "FUNCTION" BUILTIN = "BUILTIN" LIST = "LIST" HASH = "HASH" FILE = "FILE" BREAK = "BREAK" CONTINUE = "CONTINUE" CLASS = "CLASS" INSTANCE = "INSTANCE" THIS = "THIS" MODULE = "MODULE" ORIGIN = "ORIGIN" )
Variables ¶
View Source
var Builtins = map[string]*Builtin{}
Functions ¶
This section is empty.
Types ¶
type Builtin ¶
type Builtin struct {
Name string
Fn BuiltinFunction
}
type BuiltinFunction ¶
type Class ¶
type Class struct {
Name *ast.Identifier
Super *Class
Env *Environment
Scope *Environment
}
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnclosedEnvironment ¶
func NewEnclosedEnvironment(outer *Environment) *Environment
func NewEnvironment ¶
func NewEnvironment(directory string) *Environment
func (*Environment) All ¶
func (e *Environment) All() map[string]Object
func (*Environment) Del ¶
func (e *Environment) Del(name string) bool
func (*Environment) GetDirectory ¶
func (e *Environment) GetDirectory() string
func (*Environment) Has ¶
func (e *Environment) Has(name string) bool
func (*Environment) SetDirectory ¶
func (e *Environment) SetDirectory(directory string)
type Function ¶
type Function struct {
Name string
Parameters []*ast.Identifier
Defaults map[string]ast.Expression
Args *ast.Identifier
KwArgs *ast.Identifier
Body *ast.Block
Env *Environment
}
type Instance ¶
type Instance struct {
Class *Class
Env *Environment
}
type Module ¶
type Module struct {
Name string
Functions map[string]ModuleFunction
Properties map[string]ModuleProperty
}
type ModuleFunction ¶
type ModuleProperty ¶
type ModuleProperty func() Object
Click to show internal directories.
Click to hide internal directories.