diff options
Diffstat (limited to 'src/core/common/Utils.hpp')
-rw-r--r-- | src/core/common/Utils.hpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/core/common/Utils.hpp b/src/core/common/Utils.hpp index 457d446..2c8a5b3 100644 --- a/src/core/common/Utils.hpp +++ b/src/core/common/Utils.hpp @@ -58,15 +58,23 @@ public: } /** - * Returns true if the given character is in [A-Za-z_] + * Returns true if the given character is in [A-Za-z]. */ - static bool isIdentifierStart(const char c) + static bool isIdentifierStartCharacter(const char c) { - return isAlphabetic(c) || (c == '_'); + return isAlphabetic(c); } /** - * Returns true if the given character is in [A-Za-z_][A-Za-z0-9_-]* + * Returns true if the given character is in [A-Za-z0-9_-]. + */ + static bool isIdentifierCharacter(const char c) + { + return isAlphanumeric(c) || (c == '_') || (c == '-'); + } + + /** + * Returns true if the given character is in [A-Za-z][A-Za-z0-9_-]* */ static bool isIdentifier(const std::string &name); |