FenderLang / Fender

A functional scripting language, intended for string manipulation and general scripting on the command line
MIT License
13 stars 0 forks source link

Improve repl #72

Closed boxbeam closed 1 year ago

boxbeam commented 1 year ago

Uses the rustyline crate to read lines, giving a much nicer prompt

boxbeam commented 1 year ago

why

boxbeam commented 1 year ago

rustyline does exactly what we need, no more, no less, and it's extremely simple to use. why would we pull in a much more broad library only to use one small piece of it when rustyline does everything we need?

boxbeam commented 1 year ago

I think there's a way but I haven't looked into it yet, I think I'd have to do that with the Helper type in rustyline

boxbeam commented 1 year ago

Found it, https://docs.rs/rustyline/latest/rustyline/validate/trait.Validator.html will do that later