summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/common/Utils.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/common/Utils.hpp b/src/core/common/Utils.hpp
index fa3788a..457d446 100644
--- a/src/core/common/Utils.hpp
+++ b/src/core/common/Utils.hpp
@@ -58,6 +58,14 @@ public:
}
/**
+ * Returns true if the given character is in [A-Za-z_]
+ */
+ static bool isIdentifierStart(const char c)
+ {
+ return isAlphabetic(c) || (c == '_');
+ }
+
+ /**
* Returns true if the given character is in [A-Za-z_][A-Za-z0-9_-]*
*/
static bool isIdentifier(const std::string &name);