diff --git a/src/runners/repl.rs b/src/runners/repl.rs index a09e1e2..1bf22fc 100644 --- a/src/runners/repl.rs +++ b/src/runners/repl.rs @@ -24,6 +24,11 @@ pub fn run_repl() -> Result<()> { let line = line .into_diagnostic() .wrap_err("failed to read line from stdin")?; + + if line == "exit" || line == "\u{04}" { + return Ok(()); + }; + let tokens = match scan(&line) { Ok(tokens) => tokens, Err(errors) => {