Of course, this works best for simple stuff, where you just have individual commands to parse.
For a Python-style REPL with a full-fledged language attached, I would not use that approach.
There’s probably some REPL languages implemented in Rust already out there, where you can look at their approach.
Clap has an entry in their cookbook for a REPL:
Of course, this works best for simple stuff, where you just have individual commands to parse.
For a Python-style REPL with a full-fledged language attached, I would not use that approach.
There’s probably some REPL languages implemented in Rust already out there, where you can look at their approach.