mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Resolved #31, added exit and quit commands to the repl
This commit is contained in:
@@ -158,6 +158,11 @@ void repl() {
|
||||
printf("> ");
|
||||
fgets(input, size, stdin);
|
||||
|
||||
//escape the repl (length of 5 to accomodate the newline)
|
||||
if (strlen(input) == 5 && (!strncmp(input, "exit", 4) || !strncmp(input, "quit", 4))) {
|
||||
break;
|
||||
}
|
||||
|
||||
//setup this iteration
|
||||
Lexer lexer;
|
||||
Parser parser;
|
||||
|
||||
Reference in New Issue
Block a user