Make LuaStack::Load return special codes for 'slash command', 'white space', and 'truncated lua'
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user