summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/utils.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2013-03-01 15:06:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-02 12:58:18 +0100
commit7e5d1c1c2fc764d4cacc3e367542e1f42e6b772e (patch)
treeb2d555f840e30f299c7741574e6e93c4e236fcaa /src/tools/moc/utils.h
parentb0e58a9008a01cd819d942ddc79534e8dd8ef8bd (diff)
moc: Support the '$' character as an identifier
Both gcc and clang allow the use of '$' in their identifiers as an extension. moc should not throw a parse error if there is one in the file. Instead, consider '$' as valid in identifiers. Task-number: QTBUG-22720 Change-Id: I8be3a52429c0db5b7e8308b8f4fe475d3d3994bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/tools/moc/utils.h')
-rw-r--r--src/tools/moc/utils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/moc/utils.h b/src/tools/moc/utils.h
index aeb9b745f1..a2c65e4b2a 100644
--- a/src/tools/moc/utils.h
+++ b/src/tools/moc/utils.h
@@ -60,7 +60,7 @@ inline bool is_ident_start(char s)
{
return ((s >= 'a' && s <= 'z')
|| (s >= 'A' && s <= 'Z')
- || s == '_'
+ || s == '_' || s == '$'
);
}
@@ -69,7 +69,7 @@ inline bool is_ident_char(char s)
return ((s >= 'a' && s <= 'z')
|| (s >= 'A' && s <= 'Z')
|| (s >= '0' && s <= '9')
- || s == '_'
+ || s == '_' || s == '$'
);
}