#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 25 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 |
◆ cuiSetup()
void Ark::Repl::cuiSetup |
( |
| ) |
|
|
private |
◆ getCodeBlock()
std::optional< std::string > Ark::Repl::getCodeBlock |
( |
| ) |
|
|
private |
Prompt the user to enter a complete code block and handle the prompt modifications until the code block is complete.
- Returns
- std::optional<std::string>
◆ getLine()
std::optional< std::string > Ark::Repl::getLine |
( |
bool | continuation | ) |
|
|
private |
Get a line via replxx and handle commands.
- Parameters
-
continuation | if the prompt needs to be modified because a code block isn't entirely closed, set to true |
- Returns
◆ run()
Start the REPL.
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 file:
- /Users/fola/Documents/ArkScript/Ark/include/CLI/REPL/Repl.hpp