js: Don't exit the REPL when pressing enter on an empty line

This commit is contained in:
Andreas Kling 2020-03-31 13:29:42 +02:00
parent 06d35d036d
commit 9c7451a21d
Notes: sideshowbarker 2024-07-19 08:02:02 +09:00

View file

@ -164,7 +164,7 @@ void repl(JS::Interpreter& interpreter)
while (true) {
String piece = read_next_piece();
if (piece.is_empty())
break;
continue;
auto program = JS::Parser(JS::Lexer(piece)).parse_program();
if (dump_ast)