mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-11 18:58:24 +03:00
Make it easier to exit roc repl
This commit is contained in:
parent
263f9ceb41
commit
d35c578924
@ -206,7 +206,11 @@ pub fn parse_src<'a>(arena: &'a Bump, line: &'a str) -> ParseOutcome<'a> {
|
||||
match line.trim().to_lowercase().as_str() {
|
||||
"" => ParseOutcome::Empty,
|
||||
":help" => ParseOutcome::Help,
|
||||
":exit" | ":quit" | ":q" => ParseOutcome::Exit,
|
||||
// These are all common things beginners try.
|
||||
// Let people exit the repl easily!
|
||||
// If you really need to evaluate `exit` for some reason,
|
||||
// you can do `foo = exit` and then evaluate `foo` instead.
|
||||
":exit" | ":quit" | ":q" | "exit" | "quit" | "exit()" | "quit()" => ParseOutcome::Exit,
|
||||
_ => {
|
||||
let src_bytes = line.as_bytes();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user