Module repl

Module repl 

Source
Expand description

Top-level runner: parse → lower → evaluate.

TopLevel is a thin wrapper that accumulates an environment and staging context. There is no define, no macro system, no prelude - the language is exactly λ↑↓ from the paper. All recursion goes through the lambda self-ref slot; all naming goes through let.

Re-exports§

pub use runner::eval_str;
pub use runner::load_file;
pub use runner::run_repl;

Modules§

commands
REPL command implementations (:help, :env, :ctx, :load, :reset).
highlight
Syntax highlighting and bracket validation for the narju REPL.
runner
The interactive REPL loop and file/expression runners.

Structs§

RunResult
The outcome of evaluating one top-level form.
TopLevel
Accumulated evaluator state: environment vector and staging context. Exists purely as a convenience for multi-expression REPL sessions.

Functions§

parse_all
Read every form in src, wrapping reader failures in NarjuError::Parse. A thin shim over crate::parse::parse_all, whose error type is a bare String.
run_form
Execute a single pre-parsed form, evaluating it in top’s current env. Every form is an expression — there are no top-level special forms.