rt

package
v0.0.0-...-9dcd13a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const MultiRetLimit = 8

MultiRetLimit specifies max N available in RetN variables.

Variables

View Source
var (
	Ret2 lisp.Object
	Ret3 lisp.Object
	Ret4 lisp.Object
	Ret5 lisp.Object
	Ret6 lisp.Object
	Ret7 lisp.Object
	Ret8 lisp.Object
)

RetN variables store Nth return value of the function.

View Source
var (
	NilMap = make(map[lisp.Object]lisp.Object, 1)
)

Functions

func BytesToStr

func BytesToStr(slice *Slice) string

BytesToStr converts slice of bytes to string.

func CoerceBool

func CoerceBool(x lisp.Object) lisp.Object

func CoerceFloat

func CoerceFloat(x lisp.Object) lisp.Object

func CoerceInt

func CoerceInt(x lisp.Object) lisp.Object

func CoerceString

func CoerceString(x lisp.Object) lisp.Object

func CoerceSymbol

func CoerceSymbol(x lisp.Object) lisp.Object

func IfaceCall0

func IfaceCall0(iface *Iface, fnID int) lisp.Object

IfaceCall0 invokes specified function on given interface object.

func IfaceCall1

func IfaceCall1(iface *Iface, fnID int, a1 lisp.Object) lisp.Object

IfaceCall1 like IfaceCall0, but for methods with arity=1.

func IfaceCall2

func IfaceCall2(iface *Iface, fnID int, a1, a2 lisp.Object) lisp.Object

IfaceCall2 like IfaceCall0, but for methods with arity=2.

func IfaceCall3

func IfaceCall3(iface *Iface, fnID int, a1, a2, a3 lisp.Object) lisp.Object

IfaceCall3 like IfaceCall0, but for methods with arity=3.

func IfaceCall4

func IfaceCall4(iface *Iface, fnID int, a1, a2, a3, a4 lisp.Object) lisp.Object

IfaceCall4 like IfaceCall0, but for methods with arity=4.

func MakeMap

func MakeMap() lisp.Object

MakeMap creates a new map. Default size value is used (which is 65).

func MakeMapCap

func MakeMapCap(capacity int) lisp.Object

MakeMapCap creates a new map of specified initial size.

func MapInsert

func MapInsert(key lisp.Object, val lisp.Object, m lisp.Object)

MapInsert is a simple wrapper aroung "puthash" which panics if nil map "m" is used.

func MbStringGet

func MbStringGet(s string, index int) rune

MbStringGet is a part of StringIndex implementation. Called for multibyte strings.

func Panic

func Panic(errorData lisp.Object)

Panic triggers run-time panic.

func Print

func Print(args lisp.Object)

Print prints all arguments; formatting of arguments is implementation-specific.

func Println

func Println(args lisp.Object)

Println is like print but prints spaces between arguments and a newline at the end.

func SliceCap

func SliceCap(slice *Slice) int

func SliceCopy

func SliceCopy(dst, src *Slice)

SliceCopy copies one slice contents to another. Up to "min(len(dst), len(src))" elements are copied.

func SliceCopyFast

func SliceCopyFast(dst, src *Slice)

SliceCopyFast is SliceCopy specialization that is appliable if both `dst' and `src' have zero offset.

func SliceGet

func SliceGet(slice *Slice, index int) lisp.Object

SliceGet extract slice value using specified index.

func SliceLen

func SliceLen(slice *Slice) int

func SliceSet

func SliceSet(slice *Slice, index int, val lisp.Object)

SliceSet sets slice value at specified index.

func StringGet

func StringGet(s string, index int) rune

StringGet returns string nth byte. Result is not truncated to "byte" type, rune is returned.

func ToBool

func ToBool(o lisp.Object) bool

ToBool coerces Emacs Lisp value to canonical boolean representation ("nil" or "t" symbol).

Types

type Iface

type Iface struct {
	// contains filtered or unexported fields
}

Iface - Go interface.

func MakeIface

func MakeIface(itab lisp.Object, data lisp.Object) *Iface

MakeIface returns interface value for given data object. Dynamic type is updated accordingly.

type Slice

type Slice struct {
	// contains filtered or unexported fields
}

Slice - Go slice.

func ArraySlice2

func ArraySlice2(arr lisp.Object, low, high int) *Slice

ArraySlice2 slices an array: "arr[low:high]".

func ArraySliceHigh

func ArraySliceHigh(arr lisp.Object, high int) *Slice

ArraySliceHigh slices an array: "arr[:high]".

func ArraySliceLow

func ArraySliceLow(arr lisp.Object, low int) *Slice

ArraySliceLow slices an array: "arr[low:]".

func ArrayToSlice

func ArrayToSlice(data lisp.Object) *Slice

ArrayToSlice constructs a new slice from given data vector. Vector is not copied.

func MakeSlice

func MakeSlice(length int, zv lisp.Object) *Slice

MakeSlice creates a new slice with cap=len. All values initialized to specified zero value.

func MakeSliceCap

func MakeSliceCap(length, capacity int, zv lisp.Object) *Slice

MakeSliceCap creates a new slice. Each value within length bounds is initialized to specified zero value.

func SlicePush

func SlicePush(slice *Slice, val lisp.Object) *Slice

SlicePush = "append(slice, val)".

func SliceSlice2

func SliceSlice2(slice *Slice, low, high int) *Slice

SliceSlice2 = "slice[low:high]".

func SliceSliceHigh

func SliceSliceHigh(slice *Slice, high int) *Slice

SliceSliceHigh = "slice[:high]".

func SliceSliceLow

func SliceSliceLow(slice *Slice, low int) *Slice

SliceSliceLow = "slice[low:]".

func StrToBytes

func StrToBytes(s string) *Slice

StrToBytes converts string to slice of bytes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL