Expand description
Syntax highlighting and bracket validation for the narju REPL.
Structs§
- Narju
Helper - The rustyline helper for the raw λ↑↓ REPL: syntax highlighting,
filename completion (for
:load), history hints, and bracket validation. - Narju
Helper Lite - The rustyline helper for the Purple REPL: highlighting and bracket validation only. See the comment block above for why completion and hinting are stubbed out.
Constants§
- KEYWORDS
- Surface forms rendered in the keyword colour.
Functions§
- highlight_
sexp - Render
srcwith ANSI colours: keywords, literals, numbers, comments, quotes, and brackets each get their own colour. - is_
sym_ char - Whether
ccan appear in a symbol, for tokenising during highlighting. Mirrors the reader’s symbol alphabet (crate::parse); the two must agree or highlighting splits tokens differently than the reader does. - validate_
brackets - Bracket-balance validator — waits for balanced parens before submitting.