MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / isLuaIdentChar

Function isLuaIdentChar

app/src/DataModel/Editors/CodeFormatter.cpp:118–130  ·  view source on GitHub ↗

* @brief Returns true when ch can begin or continue a Lua identifier. */

Source from the content-addressed store, hash-verified

116 * @brief Returns true when ch can begin or continue a Lua identifier.
117 */
118static bool isLuaIdentChar(QChar ch, bool first)
119{
120 if (ch == QLatin1Char('_'))
121 return true;
122
123 if (ch.isLetter())
124 return true;
125
126 if (!first && ch.isDigit())
127 return true;
128
129 return false;
130}
131
132/**
133 * @brief If line[i:] opens a Lua long-bracket form, returns its level and length.

Callers 2

consumeLuaWordFunction · 0.85
analyzeLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected