Some more error checking for class names and tangible IDs
This commit is contained in:
@@ -178,14 +178,7 @@ int common_prefix_length(string_view a, string_view b) {
|
||||
}
|
||||
|
||||
bool is_lua_id(string_view str) {
|
||||
if (str.size() == 0) return false;
|
||||
char c=str[0];
|
||||
if ((!ascii_isalpha(c)) && (c!='_')) return false;
|
||||
for (int i = 1; i < int(str.size()); i++) {
|
||||
char c = str[i];
|
||||
if ((!ascii_isalpha(c)) && (!ascii_isdigit(c)) && (c!='_')) return false;
|
||||
}
|
||||
return true;
|
||||
return LuaCoreStack::valididentifier(str);
|
||||
}
|
||||
|
||||
bool is_lua_comment(string_view s) {
|
||||
|
||||
Reference in New Issue
Block a user