repl

package
v0.7.20 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: EPL-1.0 Imports: 24 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorSyntax added in v0.7.1

func ColorSyntax(line []rune, env lang.Environment) string

ColorSyntax returns an ANSI-colored version of the input for Clojure syntax highlighting.

func IsTerminal added in v0.7.4

func IsTerminal() bool

IsTerminal reports whether standard input accepts terminal ioctls.

func Start

func Start(opts ...Option)

Types

type EvalFunc added in v0.6.5

type EvalFunc func(*options, interface{}) (string, error)

EvalFunc is the signature for eval functions passed to readEvalPrint. CLI wraps evalSafe with signal handling; WASM uses evalSafe directly.

type Option

type Option func(*options)

Option is a functional option for the REPL.

func WithEnvironment

func WithEnvironment(env lang.Environment) Option

WithEnvironment sets the execution environment for the REPL.

func WithHistoryFile added in v0.6.5

func WithHistoryFile(path, format string) Option

WithHistoryFile sets the history file path and format. Format is "jline" for JLine format (Babashka/Leiningen), or empty for default JSON.

func WithNREPLClient added in v0.6.5

func WithNREPLClient(c *nrepl.Client) Option

WithNREPLClient configures the REPL to send code to a remote nREPL server instead of evaluating locally.

func WithShareBaseURL added in v0.7.8

func WithShareBaseURL(baseURL string) Option

WithShareBaseURL sets the URL used when sharing REPL expressions.

func WithStdin

func WithStdin(r io.Reader) Option

WithStdin sets the stdin for the REPL.

func WithStdout

func WithStdout(w io.Writer) Option

WithStdout sets the stdout for the REPL.

Jump to

Keyboard shortcuts

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