11#ifndef REPL_REPLXX_UTIL_HPP 
   12#define REPL_REPLXX_UTIL_HPP 
   49    replxx::Replxx::completions_t 
hookCompletion(
const std::vector<std::string>& words, 
const std::string& context, 
int& length);
 
   51    void hookColor(
const std::vector<std::pair<std::string, replxx::Replxx::Color>>& words_colors, 
const std::string& context, replxx::Replxx::colors_t& 
colors);
 
   53    replxx::Replxx::hints_t 
hookHint(
const std::vector<std::string>& words, 
const std::string& context, 
int& length, replxx::Replxx::Color& color);
 
std::vector< std::string > getAllKeywords()
Compute a list of all the language keywords and builtins.
 
long countOpenEnclosures(const std::string &line, char open, char close)
Count the open enclosure and its counterpart: (), {}, [].
 
void hookColor(const std::vector< std::pair< std::string, replxx::Replxx::Color > > &words_colors, const std::string &context, replxx::Replxx::colors_t &colors)
 
constexpr std::array colors
 
replxx::Replxx::completions_t hookCompletion(const std::vector< std::string > &words, const std::string &context, int &length)
 
std::vector< std::pair< std::string, replxx::Replxx::Color > > getColorPerKeyword()
Compute a list of pairs (word -> color) to be used for coloration by the REPL.
 
replxx::Replxx::hints_t hookHint(const std::vector< std::string > &words, const std::string &context, int &length, replxx::Replxx::Color &color)
 
void trimWhitespace(std::string &line)
Remove whitespaces at the start and end of a string.