From f066b4887f6f2896fe602f14ede9c02a9f5a7e1a Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 8 Feb 2015 18:48:27 +0100 Subject: Added isIdentifierStart function --- src/core/common/Utils.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/common/Utils.hpp') 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 @@ -57,6 +57,14 @@ public: return isAlphabetic(c) || isNumeric(c); } + /** + * 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_-]* */ -- cgit v1.2.3