Version: v0.0.0-...-53ecfd9 Latest Latest

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

Go to latest
Published: May 9, 2017 License: ISC Imports: 8 Imported by: 1



Package run provides a Lisp runtime.



This section is empty.


View Source
var (
	// shortcuts for standard types
	T   = value.T
	NIL = value.NIL
View Source
var UserEnvironment value.Environment

UserEnvironment is an environment which inherits from the system environment. Definitions introduced by a user will be bound here.

This exists here to provide isolation so that new definitions do not change the behaviour of the system environment.


func Eval

func Eval(expr value.Value) (v value.Value)

Eval applies rules to an expression, and returns an expression that is the value.

func EvalString

func EvalString(expr string) value.Value

EvalString evaluates the first Lisp expression in a string.

func Load

func Load(filename string) error

Load evaluates an entire file as if in the REPL.

func ReadString

func ReadString(text string) value.Value

ReadString reads the first textual Lisp expression from the text in string.

func Reset

func Reset()

Reset the environment for the runtime to an empty state.

func Run

func Run(r io.Reader, w io.Writer) error

Run a REPL loop, reading expressions from a reader, and writing the evaluated values to a writer.


This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL