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

Function isJsIdentChar

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

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

Source from the content-addressed store, hash-verified

85 * @brief Returns true when ch can begin or continue a JavaScript identifier.
86 */
87static bool isJsIdentChar(QChar ch, bool first)
88{
89 if (ch == QLatin1Char('_') || ch == QLatin1Char('$'))
90 return true;
91
92 if (ch.isLetter())
93 return true;
94
95 if (!first && ch.isDigit())
96 return true;
97
98 return false;
99}
100
101/**
102 * @brief Returns the JS keywords whose brace-free "(...)"-terminated headers hang the next line.

Callers 2

consumeJsWordFunction · 0.85
analyzeLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected