js: Insert newline after each line in REPL mode

This makes ASI work in the REPL.
This commit is contained in:
yeeter-the-dog 2021-06-20 13:58:57 -07:00 committed by GitHub
parent 54852832b1
commit 3ccf4dc7ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: sideshowbarker 2024-07-18 11:58:10 +09:00

View file

@ -121,6 +121,7 @@ static String read_next_piece()
s_editor->add_to_history(line);
piece.append(line);
piece.append('\n');
auto lexer = JS::Lexer(line);
enum {