From b2df9bddec0b11180f196abb1485a1ca913591c7 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Fri, 3 Jul 2009 11:00:36 +0200 Subject: Made foreach a keyword when parsing with qtMocRun --- src/shared/cplusplus/Keywords.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/shared/cplusplus/Keywords.cpp') diff --git a/src/shared/cplusplus/Keywords.cpp b/src/shared/cplusplus/Keywords.cpp index e26244a0af..3d8fc434f5 100644 --- a/src/shared/cplusplus/Keywords.cpp +++ b/src/shared/cplusplus/Keywords.cpp @@ -620,6 +620,21 @@ static inline int classify7(const char *s, bool q) { } } } + else if (q && s[0] == 'f') { + if (s[1] == 'o') { + if (s[2] == 'r') { + if (s[3] == 'e') { + if (s[4] == 'a') { + if (s[5] == 'c') { + if (s[6] == 'h') { + return T_Q_FOREACH; + } + } + } + } + } + } + } else if (q && s[0] == 's') { if (s[1] == 'i') { if (s[2] == 'g') { -- cgit v1.2.1