Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Class ¶
type Class struct {
Methods map[string]Function // Function list
ByteCode *bytecode.ByteCode // Bytecode pointer
}
Weblang class represantation in VM
type Function ¶
type Function struct {
Args map[string]interface{} // arguments list
Handler FunctionHandler // FunctionHandler interface for function invoke
ClassMethod *method.ClassMethod // ClassMethod struct from bytecode file
}
Web function representation in VM
type FunctionHandler ¶ added in v0.2.2
type FunctionHandler interface {
Invoke(args map[string]interface{}, funcPtr *Function, obj *Object) error // Invoke function execution
}
User defined function handler
type MemoryStack ¶ added in v0.3.0
type MemoryStack struct {
Classes map[string]Class // Class list
Objects map[string]Object // All objects list
}
Stack of all declared classes in VM
type Object ¶ added in v0.3.0
type Object struct {
Scope uint // Object scope, 0 - global, 1 and larger - local
Class *Class // pointer to class struct
Attributes map[string]interface{} // Attributes list
Stack *MemoryStack // list of all declared global classes & objects in VM environment
}
Object struct in VM environment
Click to show internal directories.
Click to hide internal directories.