Documentation ¶
Index ¶
- func AppSetBeforeDrawFunc(scope sabre.Scope) interface{}
- func AppSetInputCapture(scope sabre.Scope) interface{}
- func BindAll(scope sabre.Scope) error
- func Case(scope sabre.Scope, args []sabre.Value) (sabre.Value, error)
- func Gt(base float64, args ...float64) bool
- func GtE(base float64, args ...float64) bool
- func Implements(v interface{}, t sabre.Type) (bool, error)
- func ListAddItem(scope sabre.Scope) interface{}
- func Lt(base float64, args ...float64) bool
- func LtE(base float64, args ...float64) bool
- func MacroExpand(scope sabre.Scope, f sabre.Value) (sabre.Value, error)
- func MakeString(vals ...sabre.Value) sabre.Value
- func Printf(format string, args ...interface{}) error
- func Println(args ...interface{}) error
- func Random(max int) int
- func Read(prompt string) (string, error)
- func ReadFile(name string) (string, error)
- func Realize(seq sabre.Seq) *sabre.List
- func Shuffle(seq sabre.Seq) sabre.Seq
- func ThreadFirst(scope sabre.Scope, args []sabre.Value) (sabre.Value, error)
- func ThreadLast(scope sabre.Scope, args []sabre.Value) (sabre.Value, error)
- func Throw(scope sabre.Scope, args ...sabre.Value) error
- func ToType(to sabre.Type, val sabre.Value) (sabre.Value, error)
- func TypeOf(v interface{}) sabre.Value
- type Any
- type Atom
- type Xlisp
- func (slang *Xlisp) Bind(symbol string, v sabre.Value) error
- func (slang *Xlisp) BindGo(symbol string, v interface{}) error
- func (slang *Xlisp) CurrentNS() string
- func (slang *Xlisp) Eval(v sabre.Value) (sabre.Value, error)
- func (slang *Xlisp) Parent() sabre.Scope
- func (slang *Xlisp) ReadEval(r io.Reader) (sabre.Value, error)
- func (slang *Xlisp) ReadEvalStr(src string) (sabre.Value, error)
- func (slang *Xlisp) Resolve(symbol string) (sabre.Value, error)
- func (slang *Xlisp) SwitchNS(sym sabre.Symbol) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppSetBeforeDrawFunc ¶ added in v0.7.0
func AppSetInputCapture ¶ added in v0.7.0
func Implements ¶
Implements checks if given value implements the interface represented by 't'. Returns error if 't' does not represent an interface type.
func ListAddItem ¶ added in v0.7.0
TODO wrap all functions in tview library that requires callback
func MacroExpand ¶
MacroExpand is a wrapper around the sabre MacroExpand function that ignores the expanded bool flag.
func MakeString ¶
MakeString returns stringified version of all args.
func Println ¶
func Println(args ...interface{}) error
Println is an alias for fmt.Println which ignores the return values.
func Realize ¶
Realize realizes a sequence by continuously calling First() and Next() until the sequence becomes nil.
func ThreadFirst ¶
ThreadFirst threads the expressions through forms by inserting result of eval as first argument to next expr.
func ThreadLast ¶
ThreadLast threads the expressions through forms by inserting result of eval as last argument to next expr.
Types ¶
type Any ¶
type Any interface{}
type Xlisp ¶
type Xlisp struct {
// contains filtered or unexported fields
}
xlisp instance
func (*Xlisp) Bind ¶
Bind binds the given name to the given Value into the slang interpreter context.
func (*Xlisp) BindGo ¶
BindGo is similar to Bind but handles conversion of Go value 'v' to sabre Value type.
func (*Xlisp) ReadEval ¶
ReadEval reads from the given reader and evaluates all the forms obtained in Slang context.
func (*Xlisp) ReadEvalStr ¶
ReadEvalStr reads the source and evaluates it in Slang context.