#include <Repl.hpp>
|
| | Repl (const std::vector< std::filesystem::path > &lib_env) |
| | Construct a new Repl object.
|
| |
| int | run () |
| | Start the REPL.
|
| |
|
| void | cuiSetup () |
| | Configure replxx.
|
| |
| std::optional< std::string > | getLine (bool continuation) |
| | Get a line via replxx and handle commands.
|
| |
| std::optional< std::string > | getCodeBlock () |
| | Prompt the user to enter a complete code block and handle the prompt modifications until the code block is complete.
|
| |
Definition at line 24 of file Repl.hpp.
◆ Repl()
| Ark::Repl::Repl |
( |
const std::vector< std::filesystem::path > & | lib_env | ) |
|
|
explicit |
Construct a new Repl object.
- Parameters
-
| lib_env | search path for the std library |
Definition at line 16 of file Repl.cpp.
◆ cuiSetup()
| void Ark::Repl::cuiSetup |
( |
| ) |
|
|
private |
◆ getCodeBlock()
| std::optional< std::string > Ark::Repl::getCodeBlock |
( |
| ) |
|
|
private |
◆ getLine()
| std::optional< std::string > Ark::Repl::getLine |
( |
bool | continuation | ) |
|
|
private |
◆ run()
Start the REPL.
Definition at line 24 of file Repl.cpp.
References ARK_FULL_VERSION, cuiSetup(), Ark::State::doString(), Ark::VM::forceReloadPlugins(), getCodeBlock(), Ark::VM::init(), m_code, Ark::VM::m_execution_contexts, m_has_init_vm, m_old_ip, m_running, m_state, m_vm, Ark::State::reset(), and Ark::VM::safeRun().
Referenced by main().
◆ m_code
| std::string Ark::Repl::m_code |
|
private |
◆ m_has_init_vm
| bool Ark::Repl::m_has_init_vm |
|
private |
◆ m_keywords
| std::vector<std::string> Ark::Repl::m_keywords |
|
private |
◆ m_lib_env
| std::vector<std::filesystem::path> Ark::Repl::m_lib_env |
|
private |
◆ m_line_count
| unsigned Ark::Repl::m_line_count |
|
private |
◆ m_old_ip
| std::size_t Ark::Repl::m_old_ip |
|
private |
◆ m_repl
| replxx::Replxx Ark::Repl::m_repl |
|
private |
◆ m_running
| bool Ark::Repl::m_running |
|
private |
◆ m_state
◆ m_vm
◆ m_words_colors
| std::vector<std::pair<std::string, replxx::Replxx::Color> > Ark::Repl::m_words_colors |
|
private |
The documentation for this class was generated from the following files:
- /Users/fola/Documents/ArkScript/Ark/include/CLI/REPL/Repl.hpp
- /Users/fola/Documents/ArkScript/Ark/src/arkscript/REPL/Repl.cpp