summaryrefslogtreecommitdiff
path: root/src/core/common/Utils.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-08 21:42:58 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-08 21:42:58 +0100
commitfbaad57be8ddf3f90eb13551cc7eb18674b3efa2 (patch)
tree0c7390346731ebfd739f273b7f7d624608fa3be5 /src/core/common/Utils.hpp
parent616e9bfeee29556952ebdccf57cb1fd304744acb (diff)
parentbb8c69fbdeba3fa95fc780552252525b222ceb5a (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'src/core/common/Utils.hpp')
-rw-r--r--src/core/common/Utils.hpp16
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);