Fix some repl state machine bugs

This commit is contained in:
Richard Feldman 2022-10-27 05:52:26 -04:00
parent f11b2d21cb
commit 6038965cb6
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
3 changed files with 69 additions and 46 deletions

View file

@ -38,9 +38,7 @@ pub fn main() -> i32 {
editor.set_helper(Some(repl_helper));
loop {
let readline = editor.readline(PROMPT);
match readline {
match editor.readline(PROMPT) {
Ok(line) => {
let trim_line = line.trim();
editor.add_history_entry(trim_line);