mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
7b6d732a77
* goalc: cleanup goalc's main method and add nrepl listener socket * deps: add standalone ASIO for sockets * lint: formatting * common: make a common interface for creating a server socket * goalc: setup new repl server * deps: remove asio * goalc: debug issues, nrepl is working again * git: rename files * attempt to fix linux function call * test * scripts: make the error message even more obvious.... * goalc: make suggested changes, still can't reconnect properly * game: pull out single-client logic from XSocketServer * nrepl: supports multiple clients and disconnection/reconnects * goalc: some minor fixes for tests * goalc: save repl history when the compiler reloads * common: add include for linux networking * a few small changes to fix tests * is it the assert? * change thread start order and add a print to an assert Co-authored-by: water <awaterford111445@gmail.com>
35 lines
853 B
C++
35 lines
853 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "third-party/replxx/include/replxx.hxx"
|
|
|
|
using Replxx = replxx::Replxx;
|
|
|
|
class ReplWrapper {
|
|
Replxx repl;
|
|
|
|
public:
|
|
ReplWrapper() {}
|
|
Replxx& get_repl() { return repl; }
|
|
void init_default_settings();
|
|
|
|
// Functionality / Commands
|
|
void clear_screen();
|
|
void print_to_repl(const std::string_view& str);
|
|
void print_welcome_message();
|
|
void set_history_max_size(size_t len);
|
|
const char* readline(const std::string& prompt);
|
|
void add_to_history(const std::string& line);
|
|
void save_history();
|
|
void load_history();
|
|
void print_help_message();
|
|
std::pair<std::string, bool> get_current_repl_token(std::string const& context);
|
|
|
|
std::vector<std::string> examples{};
|
|
using cl = Replxx::Color;
|
|
std::vector<std::pair<std::string, cl>> regex_colors{};
|
|
};
|