Initial revision of lua 'doc' function

This commit is contained in:
2021-12-15 23:03:43 -05:00
parent e0001127c7
commit 1cfdb4fa09
22 changed files with 301 additions and 199 deletions

View File

@@ -64,6 +64,9 @@ std::string hash_to_hex(const HashValue &hash);
// Split a string into multiple strings
StringVec split(const std::string &s, char sep);
// Split a string into multiple strings using \r or \n
StringVec split_lines(const std::string &s);
// Join multiple strings into one string
std::string join(const StringVec &strs, std::string sep);
@@ -108,6 +111,9 @@ bool world_type_authoritative(util::WorldType wt);
// Make a LuaSourceVec with one element, for unit testing.
LuaSourcePtr make_lua_source(const std::string &code);
// Return true if the line of code is a lua comment.
bool is_lua_comment(const std::string &line);
// Remove nullptrs from a vector of unique pointers.
template<class T>
void remove_nullptrs(std::vector<std::unique_ptr<T>> &vec) {