Documentation
¶
Index ¶
Constants ¶
View Source
const ( EOF = -(iota + 1) IdentifierToken IntToken BooleanToken StringToken )
View Source
const BOOLEAN = 57348
View Source
const IDENTIFIER = 57346
View Source
const NUMBER = 57347
View Source
const STRING = 57349
Variables ¶
View Source
var (
Null = &Pair{ObjectBase: ObjectBase{parent: nil}, Car: nil, Cdr: nil}
)
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor struct { ObjectBase // contains filtered or unexported fields }
type Application ¶
type Application struct { ObjectBase // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication(parent Object) *Application
func (*Application) Eval ¶
func (a *Application) Eval() Object
func (*Application) String ¶
func (a *Application) String() string
type Boolean ¶
type Boolean struct { ObjectBase // contains filtered or unexported fields }
func NewBoolean ¶
type Closure ¶
type Closure struct { ObjectBase // contains filtered or unexported fields }
func NewClosure ¶
func WrapClosure ¶
Cover the given object with a new closure. Insert this into tree structure between given object and its parent.
func (*Closure) DefineFunction ¶
type Interpreter ¶
type Interpreter struct { *Parser // contains filtered or unexported fields }
func NewInterpreter ¶
func NewInterpreter(source string) *Interpreter
func (*Interpreter) DumpAST ¶
func (i *Interpreter) DumpAST(object Object, indentLevel int)
func (*Interpreter) EvalResults ¶
func (i *Interpreter) EvalResults(dumpAST bool) (results []string)
func (*Interpreter) PrintErrors ¶
func (i *Interpreter) PrintErrors(dumpAST bool)
func (*Interpreter) PrintResults ¶
func (i *Interpreter) PrintResults(dumpAST bool)
func (*Interpreter) ReloadSourceCode ¶
func (i *Interpreter) ReloadSourceCode(source string)
Load new source code with current environment
type Lexer ¶
func (Lexer) IndentLevel ¶
type Macro ¶
type Macro struct {
ObjectBase
}
type Number ¶
type Number struct { ObjectBase // contains filtered or unexported fields }
type ObjectBase ¶
type ObjectBase struct {
// contains filtered or unexported fields
}
func (*ObjectBase) Bounder ¶
func (o *ObjectBase) Bounder() *Variable
func (*ObjectBase) Eval ¶
func (o *ObjectBase) Eval() Object
func (*ObjectBase) Parent ¶
func (o *ObjectBase) Parent() Object
func (*ObjectBase) String ¶
func (o *ObjectBase) String() string
type Pair ¶
type Pair struct { ObjectBase Car Object Cdr Object }
func (*Pair) AppendList ¶
func (*Pair) ListLength ¶
type String ¶
type String struct { ObjectBase // contains filtered or unexported fields }
type Subroutine ¶
type Subroutine struct { ObjectBase // contains filtered or unexported fields }
func NewSubroutine ¶
func NewSubroutine(function func(*Subroutine, Object) Object) *Subroutine
func (*Subroutine) Eval ¶
func (s *Subroutine) Eval() Object
func (*Subroutine) Invoke ¶
func (s *Subroutine) Invoke(argument Object) Object
func (*Subroutine) String ¶
func (s *Subroutine) String() string
type Symbol ¶
type Symbol struct { ObjectBase // contains filtered or unexported fields }
type Syntax ¶
type Syntax struct { ObjectBase // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.