QOL improvements to docsearch: alphabetize, filter out unittests
This commit is contained in:
@@ -49,7 +49,9 @@ inline bool ascii_isupper(char c) { return (c >= 'A') && (c <= 'Z'); }
|
||||
inline bool ascii_islower(char c) { return (c >= 'a') && (c <= 'z'); }
|
||||
inline bool ascii_isdigit(char c) { return (c >= '0') && (c <= '9'); }
|
||||
inline bool ascii_isalpha(char c) { return ascii_isupper(c) || ascii_islower(c); }
|
||||
inline bool ascii_isualpha(char c) { return ascii_isalpha(c) || (c == '_'); }
|
||||
inline bool ascii_isalnum(char c) { return ascii_isalpha(c) || ascii_isdigit(c); }
|
||||
inline bool ascii_isualnum(char c) { return ascii_isalpha(c) || ascii_isdigit(c) || (c == '_'); }
|
||||
inline bool ascii_isspace(char c) { return (c==' ')||(c=='\t')||(c=='\r')||(c=='\n')||(c=='\f')||(c=='\v'); }
|
||||
|
||||
// Check for the null string_view
|
||||
@@ -110,18 +112,24 @@ bool is_lua_classname(string_view s);
|
||||
// Return true if the line of code is a lua comment.
|
||||
bool is_lua_comment(string_view s);
|
||||
|
||||
// Return true if the line is a lua function prototype.
|
||||
bool is_lua_function_prototype(string_view s);
|
||||
|
||||
// Return true if the line is entirely whitespace.
|
||||
bool is_whitespace(string_view s);
|
||||
|
||||
// Get the function name from a lua function prototype.
|
||||
// Returns empty string if the prototype is malformed or
|
||||
// is not a lua function prototype at all.
|
||||
string_view lua_function_proto_name(string_view s);
|
||||
|
||||
// Return the first character, but if the view is empty,
|
||||
// return zero.
|
||||
inline char zfront(string_view &s) {
|
||||
return s.empty() ? char(0) : s.front();
|
||||
}
|
||||
|
||||
// Read whitespace from a string_view.
|
||||
//
|
||||
string_view read_space(string_view &source);
|
||||
|
||||
// Read from a string_view until separator is reached.
|
||||
//
|
||||
// If the separator appears in the source, returns everything
|
||||
@@ -166,11 +174,19 @@ string_view read_to_space(string_view &source);
|
||||
//
|
||||
string_view read_nbytes(string_view &source, int nbytes);
|
||||
|
||||
// Read an ascii identifier from a string_view
|
||||
// Read an identifier from a string_view
|
||||
//
|
||||
// If there's no valid identifier, returns empty string.
|
||||
// Underscores are not allowed in the identifier.
|
||||
//
|
||||
string_view read_ascii_identifier(string_view &source);
|
||||
string_view read_simple_identifier(string_view &source);
|
||||
|
||||
// Read an identifier from a string_view
|
||||
//
|
||||
// If there's no valid identifier, returns empty string.
|
||||
// Lua identifiers are allowed to have underscores.
|
||||
//
|
||||
string_view read_lua_identifier(string_view &source);
|
||||
|
||||
// Read a number from a string view
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user