ArkScript
A small, lisp-inspired, functional scripting language
Utils.cpp File Reference
#include <CLI/REPL/Utils.hpp>
#include <regex>
#include <algorithm>
#include <numeric>
#include <ranges>
#include <Ark/Builtins/Builtins.hpp>
#include <Ark/Compiler/Common.hpp>
Include dependency graph for Utils.cpp:

Go to the source code of this file.

Namespaces

namespace  Ark
 
namespace  Ark::internal
 

Functions

std::vector< std::string > Ark::internal::getAllKeywords ()
 Compute a list of all the language keywords and builtins.
 
std::vector< std::pair< std::string, replxx::Replxx::Color > > Ark::internal::getColorPerKeyword ()
 Compute a list of pairs (word -> color) to be used for coloration by the REPL.
 
std::size_t Ark::internal::codepointLength (const std::string &str)
 
std::size_t Ark::internal::contextLen (const std::string &prefix)
 
replxx::Replxx::completions_t Ark::internal::hookCompletion (const std::vector< std::string > &words, const std::string &context, int &length)
 
void Ark::internal::hookColor (const std::vector< std::pair< std::string, replxx::Replxx::Color > > &words_colors, const std::string &context, replxx::Replxx::colors_t &colors)
 
replxx::Replxx::hints_t Ark::internal::hookHint (const std::vector< std::string > &words, const std::string &context, int &length, replxx::Replxx::Color &color)