Documentation ¶
Index ¶
Constants ¶
View Source
const ( INTEGER_OBJ = "INTEGER" BOOLEAN_OBJ = "BOOLEAN" STRING_OBJ = "STRING" NULL_OBJ = "NULL" RETURN_VALUE_OBJ = "RETURN_VALUE" ERROR_VALUE_OBJ = "ERROR_VALUE" FUNCTION_OBJ = "FUNCTION" BUILTIN_OBJ = "BUILTIN" ARRAY_OBJ = "ARRAY" VAR_ARGS_OBJ = "VAR_ARGS" MAP_OBJ = "MAP" )
View Source
const RED = "\x1b[31m"
View Source
const RESET_COLOR = "\x1b[0m"
View Source
const UNDERLINE = "\x1b[4m"
View Source
const UNDERLINE_RESET = "\x1b[24m"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Elems []Object
}
func (*Array) Type ¶
func (a *Array) Type() ObjectType
type Boolean ¶
type Boolean struct {
Value bool
}
func (*Boolean) Type ¶
func (i *Boolean) Type() ObjectType
type Builtin ¶
type Builtin struct { Function BuiltinFunction NumArgs int // -1 for any SupportedTypes []ObjectType }
func (*Builtin) Type ¶
func (f *Builtin) Type() ObjectType
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnclosedEnvironment ¶
func NewEnclosedEnvironment(outer *Environment) *Environment
func NewEnvironment ¶
func NewEnvironment() *Environment
func (*Environment) Copy ¶
func (e *Environment) Copy() *Environment
func (*Environment) GetVarArgs ¶
func (e *Environment) GetVarArgs() ([]Object, bool)
func (*Environment) SetVarArgs ¶
func (e *Environment) SetVarArgs(varArgs []Object)
type Function ¶
type Function struct { Args []*ast.IdentifierExpr VarArgs bool Body *ast.BlockStatement Env *Environment }
func (*Function) Type ¶
func (f *Function) Type() ObjectType
type Integer ¶
type Integer struct {
Value int64
}
func (*Integer) Type ¶
func (i *Integer) Type() ObjectType
type Object ¶
type Object interface { Type() ObjectType Inspect() string }
type ObjectType ¶
type ObjectType string
type Return ¶
type Return struct {
Value Object
}
func (*Return) Type ¶
func (r *Return) Type() ObjectType
Click to show internal directories.
Click to hide internal directories.