# Functions
Array returns an LVal representing an array reference.
Bool returns an LVal with truthiness identical to b.
Bytes returns an LVal representing binary data b.
DefaultBuiltins returns the default set of LBuiltinDefs added to LEnv objects when LEnv.AddBuiltins is called without arguments.
DefaultMacros returns the default set of LBuiltinDef added to LEnv objects when LEnv.AddMacros is called without arguments.
DefaultSpecialOps returns the default set of LBuiltinDef added to LEnv objects when LEnv.AddSpecialOps is called without arguments.
Error returns an LError representing err.
ErrorCondition returns an LError representing err and having the given condition type.
ErrorConditionf returns an LError with a formatted error message.
Errorf returns an LError with a formatted error message.
Float returns an LVal representation of the number x.
Formals returns an LVal reprsenting a function's formal argument list containing symbols with the given names.
Fun returns an LVal representing a function.
FunRef returns a reference to fun that uses the local name symbol.
GetType returns a quoted symbol denoting v's type.
GoError returns an error that represents v.
GoFloat64 converts the numeric value that v represents to a float64 and returns it with the value true.
GoInt converts the numeric value that v represents to and int and returns it with the value true.
GoMap converts an LSortMap to its Go equivalent and returns it with a true second argument.
GoSlice returns the string that v represents and the value true.
GoString returns the string that v represents and the value true.
GoValue converts v to its natural representation in Go.
InitializeTypedef injects the meta-typedef object so `new` and `deftype` can be used to create user-defined types.
InitializeUserEnv creates the default user environment.
Int returns an LVal representing the number x.
LoaderMust returns its first argument when err is nil.
Macro returns an LVal representing a macro.
MakeVector returns a vector with n cells initialized to Nil.
Native returns an LVal containng a native Go value.
NewEnv returns initializes and returns a new LEnv.
NewEnvRuntime initializes a new LEnv, like NewEnv, but it explicitly specifies the runtime to use.
NewPackage initializes and returns a package with the given name.
NewRegistry initializes and returns a new PackageRegistry.
Nil returns an LVal representing nil, an empty list, an absent value.
Not interprets v as a boolean value and returns its negation.
QExpr returns an LVal representing an Q-expression, a quoted expression, a list.
QSymbol returns an LVal representing the quoted symbol.
Quote quotes v and returns the quoted value.
RegisterDefaultBuiltin adds the given function to the list returned by DefaultBuiltins.
RegisterDefaultMacro adds the given function to the list returned by DefaultMacros.
RegisterDefaultSpecialOp adds the given function to the list returned by DefaultSpecialOps.
SExpr returns an LVal representing an S-expression, a symbolic expression.
SortedMap returns an LVal representing a sorted map.
SortedMapFromData returns sorted-map with the given backing implementation.
SpecialOp returns an LVal representing a special operator.
Splice is used in the implementation of quasiquote to insert a list into an outer slist.
No description provided by the author
StandardRuntime returns a new Runtime with an empty package registry and Stderr set to os.Stderr.
String returns an LVal representing the string str.
Symbol returns an LVal representing the symbol s.
SymbolName returns the name of the symbol that v represents and the value true.
TextLoader parses a text stream using r and returns a Loader which evaluates the stream's expressions when called.
True interprets v as a boolean and returns the result.
Value conveniently converts v to an LVal.
Vector returns an LVal representing a vector, a 1-dimensional array.
WithLibrary returns a Config that makes environments use l as a source library.
WithLoader returns a Config that executes fn and ensures that the environment's working package is reset following execution of fn.
WithMaximumLogicalStackHeight returns a Config that will prevent an execution environment from allowing the logical stack height to exceed n.
WithMaximumPhysicalStackHeight returns a Config that will prevent an execution environment from allowing the physical stack height to exceed n.
WithReader returns a Config that makes environments use r to parse source streams.
WithStderr returns a Config that makes environments write debugging output to w instead of the default, os.Stderr.
# Constants
AnonArgSymbolPrefix is used to indicate unnamed arguments in the anonymous function shorthand ``(expr ...)''.
DefaultLangPackage is the name of default language package.
DefaultUserPackage is the name of the entry point package for interpreting user code.
No description provided by the author
FalseSymbol is the language's defacto false boolean value, though nil is also considered false by functions and operators expecting a boolean.
KeyArgSymbol is the symbol used to indicate keyword arguments to a function.
LArray values use the LVal.Cells slice to store the following items: [0] a list containing dimension cardinalities in index 0 [1] a list containing row-major ordered array values.
LBytes values store a *[]byte in the LVal.Native field.
LError values use the LVal.Cells slice to store the following items: [0] a symbol representing the error "condition" (class name) [1:] error data (of any type)
In addition, LError values store a copy of the function call stack at the time of their creation in the LVal.Native field.
LFloat values store a float64 in the LVal.Float field.
LFun values use the following fields in an LVal: LVal.Str The local name used to reference the function (if any) LVal.Native An LFunData object
In addition to these fields, a function defined in lisp (with defun, lambda, defmacro, etc) uses the LVal.Cells field to store the following items: [0] a list describing the function's arguments [1:] body expressions of the function (potentially no expressions)
NOTE: Native go functions (LBuiltin) don't have a lexical environment by default.
LFunType constants.
LFunType constants.
LFunType constants.
LInt values store an int in the LVal.Int field.
LInvalid (0) is not a valid lisp type.
LEnv will evaluate the returned LVal a subsequent time.
LEnv resumes a call a set number of frames down the stack.
LEnv marks the frame as terminal and evaluates tho contained expr.
LNative values store a Go value in the LVal.Native field and can be used by builtin functions to store values of any type.
TODO: Remove this..
LQuote values are special values only used to represents two or more levels of quoting (e.g.
LSExpr values are "list" values in lisp and store their values in LVal.Cells.
LSortMap value uses the LVal.Map field to store a map.
LString values store a string in the LVal.Str field.
LSymbol values store a string representation of the symbol in the LVal.Str field.
LTaggedVal is a user-defined type that uses the following fields in an LVal: LVal.Str The user-defined type name LVal.Cells[0] The user-data for the typed-value.
LTypeMax is not a real type but represents a value numerically greater than all valid LType values.
MetadaArgPrefix is a disallowed prefix for formal argument symbols.
OptArgSymbol is the symbol used to indicate optional arguments to a function.
TrueSymbol is the language's defacto true boolean value, though anything other than nil and 'false are considered true by functions and operators expecting a boolean.
VarArgSymbol is the symbol that indicates a variadic function argument in a function's list of formal arguments.
# Structs
CallFrame is one frame in the CallStack.
CallStack is a function call stack.
LEnv is a lisp environment.
No description provided by the author
No description provided by the author
LVal is a lisp value.
MapData is a concrete type to store in an interface as to avoid expensive runtime interface type checking.
Package is a named set of bound symbols.
PackageRegistry contains a set of packages.
No description provided by the author
RelativeFileSystemLibrary implements SourceLibrary and reads lisp source files from the filesystem, relative to the source context location.
Runtime is an object underlying a family of tree of LEnv values.
# Interfaces
LBuiltinDef is a built-in function.
LocationReader is like Reader but assigns physical locations to the tokens from r.
No description provided by the author
Interface for a profiler.
Reader abstracts a parser implementation so that it may be implemented in a separate package as an optional/swappable component.
SourceContext provides an execution context allowing SourceLibraries flexibility in determining how to interpret a path.
SourceLibrary is responsible for loading source code from a given path.
# Type aliases
Config is a function that configures a root environment or its runtime.
ErrorVal implements the error interface so that errors can be first class lisp objects.
LBuiltin is a function that performs executes a lisp function.
LFunType denotes special functions, either macros or special operators.
No description provided by the author
LType is the type of an LVal.