lisp

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Funcs contains all known Emacs Lisp functions.
	// Each function is unique (pointer comparison can be used).
	Funcs map[string]*Func

	// FFI stores {go sym}->{lisp func} mapping.
	// If   "FFI[x].Name == Funcs[y].Name",
	// then "FFI[x] == Funcs[y]" is also valid.
	FFI map[string]*Func
)
View Source
var (
	FnError             = &Func{Name: "error"}
	FnSignal            = &Func{Name: "signal"}
	FnThrow             = &Func{Name: "throw"}
	FnMapconcat         = &Func{Name: "mapconcat"}
	FnIsMultibyteString = &Func{Name: "multibyte-string-p"}
	FnPrin1ToString     = &Func{Name: "prin1-to-string"}

	FnCopySequence   = &Func{Name: "copy-sequence"}
	FnIntern         = &Func{Name: "intern"}
	FnGethash        = &Func{Name: "gethash"}
	FnMakeVector     = &Func{Name: "make-vector"}
	FnRemhash        = &Func{Name: "remhash"}
	FnHashTableCount = &Func{Name: "hash-table-count"}
	FnVector         = &Func{Name: "vector"}

	FnStringBytes = &Func{Name: "string-bytes"}

	FnSubstr   = &Func{Name: "substring"}
	FnConcat   = &Func{Name: "concat"}
	FnNeg      = &Func{Name: "-"}
	FnAdd1     = &Func{Name: "1+"}
	FnSub1     = &Func{Name: "1-"}
	FnMin      = &Func{Name: "min"}
	FnLen      = &Func{Name: "length"}
	FnIsStr    = &Func{Name: "stringp"}
	FnIsInt    = &Func{Name: "integerp"}
	FnIsFloat  = &Func{Name: "floatp"}
	FnIsSymbol = &Func{Name: "symbolp"}
	FnIsBool   = &Func{Name: "booleanp"}
	FnList     = &Func{Name: "list"}

	FnCons   = &Func{Name: "cons"}
	FnCar    = &Func{Name: "car"}
	FnCdr    = &Func{Name: "cdr"}
	FnAref   = &Func{Name: "aref"}
	FnAset   = &Func{Name: "aset"}
	FnMemq   = &Func{Name: "memq"}
	FnMember = &Func{Name: "member"}
)
View Source
var (
	FnEq     = &Func{Name: "eq"}
	FnEqual  = &Func{Name: "equal"}
	FnNumEq  = &Func{Name: "="}
	FnNumLt  = &Func{Name: "<"}
	FnNumGt  = &Func{Name: ">"}
	FnNumLte = &Func{Name: "<="}
	FnNumGte = &Func{Name: ">="}
	FnAdd    = &Func{Name: "+"}
	FnSub    = &Func{Name: "-"}
	FnMul    = &Func{Name: "*"}
	FnQuo    = &Func{Name: "/"}
	FnStrEq  = &Func{Name: "string="}
	FnStrLt  = &Func{Name: "string<"}
	FnStrGt  = &Func{Name: "string>"}
	FnNot    = &Func{Name: "not"}
	FnLsh    = &Func{Name: "lsh"}    // "<<"
	FnLogand = &Func{Name: "logand"} // "&"
	FnLogior = &Func{Name: "logior"} // "|"
	FnLogxor = &Func{Name: "logxor"} // "^"
)

Operators-like functions.

View Source
var (
	TypObject *types.Named
	TypSymbol *types.Named
)
View Source
var Package *types.Package

Functions

func InitPackage

func InitPackage(pkg *types.Package) error

Types

type Func

type Func struct {
	Name string
}

Func is an arbitrary Emacs Lisp function.

func InternFunc

func InternFunc(lispSym string) *Func

InternFunc creates lisp function with lispSym name. Two calls for same symbol return identical object.

type Symbol

type Symbol string

Jump to

Keyboard shortcuts

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