make empty REPL line not stop REPL
This commit is contained in:
parent
d1047fcdc6
commit
59a9a5daf4
@ -167,7 +167,8 @@ int main(int argc, char* argv[]) {
|
|||||||
size_t gl = 0;
|
size_t gl = 0;
|
||||||
if (!silentREPL) printf(" ");
|
if (!silentREPL) printf(" ");
|
||||||
i64 read = getline(&ln, &gl, stdin);
|
i64 read = getline(&ln, &gl, stdin);
|
||||||
if (read<=0 || ln[0]==0 || ln[0]==10) { if(!silentREPL) putchar('\n'); break; }
|
if (read<=0 || ln[0]==0) { if(!silentREPL) putchar('\n'); break; }
|
||||||
|
if (ln[0]==10) { free(ln); continue; }
|
||||||
B code;
|
B code;
|
||||||
bool output;
|
bool output;
|
||||||
if (ln[0] == ')') {
|
if (ln[0] == ')') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user