A small interpreted language written in Rust: hand-written lexer, Pratt parser, tree-walking evaluator, and a mark-sweep garbage collector. Built to explore how languages work end to end.
define add(a, b) {
return a + b
}
init xs = [3, 1, 2]
print(add(len(xs), 1)) // 4Prerequisites: Rust (edition 2021).
cargo run # REPL
cargo run -- program.bs # run a file
cargo testThe REPL highlights as you type, completes names, and echoes expression results. Ctrl-C cancels the current entry; Ctrl-D exits.
- Garbage collected in safe Rust; no
unsafe. - No closures,
break/continue, or floats yet. Blocks don't introduce scopes; function calls do. - Diagnostics via
mietteandthiserror. - A work in progress; syntax and semantics may change.