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§
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 inNarjuError::Parse. A thin shim overcrate::parse::parse_all, whose error type is a bareString. - 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.