mirror of
https://github.com/open-goal/jak-project
synced 2026-06-02 18:19:07 -04:00
goalc/repl: cleanup of goalc/REPL code and some QoL improvements (#2104)
- lets you split up your `startup.gc` file into two sections - one that runs on initial startup / reloads - the other that runs when you listen to a target - allows for customization of the keybinds added a month or so ago - removes a useless flag (--startup-cmd) and marks others for deprecation. - added another help prompt that lists all the keybinds and what they do Co-authored-by: water <awaterford111445@gmail.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <regex>
|
||||
|
||||
#include "common/util/diff.h"
|
||||
|
||||
namespace str_util {
|
||||
|
||||
const std::string WHITESPACE = " \n\r\t\f\v";
|
||||
@@ -47,4 +49,12 @@ bool valid_regex(const std::string& regex) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string diff(const std::string& lhs, const std::string& rhs) {
|
||||
return google_diff::diff_strings(lhs, rhs);
|
||||
}
|
||||
/// Default splits on \n characters
|
||||
std::vector<std::string> split(const ::std::string& str, char delimiter) {
|
||||
return google_diff::split_string(str, delimiter);
|
||||
}
|
||||
} // namespace str_util
|
||||
|
||||
Reference in New Issue
Block a user