Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Value []Object
}
func (*Array) Type ¶
func (n *Array) Type() ObjectType
type Env ¶
type Env struct { // Stack is the primary storage of values. Stack stack Vars vars }
Env is an environment of the runtime which contains runtime values.
type Number ¶
type Number struct {
Value float64
}
func (*Number) Type ¶
func (n *Number) Type() ObjectType
type Object ¶
type Object interface { // Type returns the primitive type of the object. Type() ObjectType // String returns the string representation of the value. String() string }
Object represents an object in the runtime.
type ObjectType ¶
type ObjectType string
const ( NumberType ObjectType = "Number" StringType ObjectType = "String" BoolType ObjectType = "Bool" ObjType ObjectType = "Obj" NullType ObjectType = "Null" ArrayType ObjectType = "Array" )
Click to show internal directories.
Click to hide internal directories.