Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Boolean ¶
type Boolean struct {
Value bool
}
type Builtin ¶
type Builtin struct {
Fn BuiltinFunction
}
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 Function ¶
type Function struct { Parameters []*syntaxtree.Identifier Body *syntaxtree.BlockStmt Env *Environment }
type Integer ¶
type Integer struct {
Value int
}
type Null ¶
type Null struct{}
Null references were introduced to the ALGOL W language in 1965 Tony Hoare was the person behind this and later on he called this a “billion-dollar mistake”
type ReturnValue ¶
type ReturnValue struct {
Value Object
}
ReturnValue is used as a wrapper around the to-be returned Value Object. This is strictly done to skip doing ugly go to statements.
func (*ReturnValue) Inspect ¶
func (rv *ReturnValue) Inspect() string
func (*ReturnValue) Type ¶
func (rv *ReturnValue) Type() Type
type String ¶
type String struct {
Value string
}
type Type ¶
type Type string
const ( IntegerObject Type = "Integer" BooleanObject Type = "Boolean" NullObject Type = "Null" ReturnValueObject Type = "ReturnValue" ErrorObject Type = "Error" FunctionObject Type = "Function" StringObject Type = "String" BuiltinObject Type = "Builtin" ArrayObject Type = "Array" HashObject Type = "Hash" )
Click to show internal directories.
Click to hide internal directories.