forked from qt-creator/qt-creator
Made foreach a keyword when parsing with qtMocRun
This commit is contained in:
@@ -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') {
|
||||
|
@@ -90,7 +90,7 @@ static const char *token_names[] = {
|
||||
("@protected"), ("@protocol"), ("@public"), ("@required"), ("@selector"),
|
||||
("@synchronized"), ("@synthesize"), ("@throw"), ("@try"),
|
||||
|
||||
("SIGNAL"), ("SLOT"), ("Q_SIGNAL"), ("Q_SLOT"), ("signals"), ("slots")
|
||||
("SIGNAL"), ("SLOT"), ("Q_SIGNAL"), ("Q_SLOT"), ("signals"), ("slots"), ("Q_FOREACH")
|
||||
};
|
||||
|
||||
Token::Token() :
|
||||
|
Reference in New Issue
Block a user