summaryrefslogtreecommitdiff
path: root/tools/preproc/char_util.h
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-05-15 07:08:39 -0700
committerYamaArashi <shadow962@live.com>2016-05-15 07:08:39 -0700
commit91c4c96fe991b9a5c3aff6af3f1d4cb715b89c5c (patch)
treef69626c30173576a604d4bd04d034bb5ef8a0e9d /tools/preproc/char_util.h
parenteaa9f37ca97c1c546fa3386d4389a45ebbc60b18 (diff)
allow multiple symbols/integers inside curly brackets in preproc
Diffstat (limited to 'tools/preproc/char_util.h')
-rw-r--r--tools/preproc/char_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/preproc/char_util.h b/tools/preproc/char_util.h
index 05f9a1dd4..ab20dbc53 100644
--- a/tools/preproc/char_util.h
+++ b/tools/preproc/char_util.h
@@ -56,6 +56,12 @@ inline bool IsAsciiPrintable(unsigned char c)
return (c >= ' ' && c <= '~');
}
+// Returns whether the character can start the identifier of a "{FOO}" constant in strings.
+inline bool IsIdentifierStartingChar(unsigned char c)
+{
+ return IsAsciiAlpha(c) || c == '_';
+}
+
// Returns whether the character can be used in the identifier of a "{FOO}" constant in strings.
inline bool IsIdentifierChar(unsigned char c)
{