Make LuaStack::Load return special codes for 'slash command', 'white space', and 'truncated lua'

This commit is contained in:
2025-12-18 14:45:57 -05:00
parent f75ff36c3d
commit 63aa5b4c15
4 changed files with 36 additions and 13 deletions

View File

@@ -199,6 +199,15 @@ bool is_lua_comment(string_view s) {
return s.substr(start, 2) == "--";
}
bool is_whitespace(string_view s) {
for (int i = 0; i < int(s.size()); i++) {
if (!ascii_isspace(s[i])) {
return false;
}
}
return true;
}
string_view read_to_sep(string_view &source, char sep) {
size_t pos = source.find(sep);
string_view result;