MCPcopy Create free account
hub / github.com/crownengine/crown / is_lua_identifier

Function is_lua_identifier

src/lua/lua_environment.cpp:694–710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692}
693
694static bool is_lua_identifier(const char *str)
695{
696 CE_ENSURE(NULL != str);
697
698 if (str[0] == '\0')
699 return false;
700
701 if (!(isalpha(str[0]) != 0 || str[0] == '_'))
702 return false;
703
704 for (const char *ch = str + 1; *ch; ++ch) {
705 if (isalnum(*ch) == 0 && *ch != '_')
706 return false;
707 }
708
709 return true;
710}
711
712static bool is_lua_identifier_char(char ch)
713{

Callers 1

console_command_suggestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected