diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-08 18:48:27 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-08 18:48:27 +0100 |
commit | f066b4887f6f2896fe602f14ede9c02a9f5a7e1a (patch) | |
tree | d1b62da9753f1b3f4f9aba63cac0dbfd25d118a1 /src/core/common/Utils.hpp | |
parent | f713b1d393230e7083727d457623fdac878eb248 (diff) |
Added isIdentifierStart function
Diffstat (limited to 'src/core/common/Utils.hpp')
-rw-r--r-- | src/core/common/Utils.hpp | 8 |
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); |