Skip to main content

Module run_repl_impl

Module run_repl_impl 

Source
Expand description

Faithful port of runReplImpl from CLI/src/Repl.cpp, with the isocline line editor replaced by rustyline.

isocline → rustyline mapping:

  • ic_set_default_completer(completeRepl, L) + ic_complete_word become a rustyline Helper whose Completer::complete runs the faithful complete_repl port (Luau’s global-table introspection).
  • The C++ multiline behavior — keep reading while runCode reports a parse error ending in “” — becomes Validator::validate returning ValidationResult::Incomplete for the same incomplete-input condition, so the editor keeps reading lines within a single readline call.
  • ic_set_history(path, -1) / isocline’s auto-save become Editor::load_history + set_max_history_size + save_history on exit; ic_history_add becomes Editor::add_history_entry.

Functions§

run_repl_impl