mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
LibLine: Use Core::EventLoop for outer read loop
This commit changes LibLine's internal structure to work in an event loop, and as a result, also switches it to being a Core::Object.
This commit is contained in:
parent
8e6df3949d
commit
70a213a6ec
7 changed files with 583 additions and 517 deletions
|
@ -65,7 +65,7 @@ private:
|
|||
|
||||
static bool s_dump_ast = false;
|
||||
static bool s_print_last_result = false;
|
||||
static OwnPtr<Line::Editor> s_editor;
|
||||
static RefPtr<Line::Editor> s_editor;
|
||||
static int s_repl_line_level = 0;
|
||||
static bool s_fail_repl = false;
|
||||
|
||||
|
@ -510,7 +510,7 @@ int main(int argc, char** argv)
|
|||
if (test_mode)
|
||||
enable_test_mode(*interpreter);
|
||||
|
||||
s_editor = make<Line::Editor>();
|
||||
s_editor = Line::Editor::construct();
|
||||
|
||||
signal(SIGINT, [](int) {
|
||||
if (!s_editor->is_editing())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue