forked from qt-creator/qt-creator
Syntax highlighting for Objective-C identifiers (super, self, nil, Nil, _cmd, SEL, IMP, BOOL, YES, NO, id).
This commit is contained in:
@@ -61,6 +61,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
|
||||
SimpleLexer tokenize;
|
||||
tokenize.setQtMocRunEnabled(false);
|
||||
tokenize.setObjCEnabled(true);
|
||||
|
||||
int initialState = state;
|
||||
const QList<SimpleToken> tokens = tokenize(text, initialState);
|
||||
@@ -157,7 +158,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
initialState = 0;
|
||||
}
|
||||
|
||||
} else if (tk.isKeyword() || isQtKeyword(tk.text()) || tk.isObjCAtKeyword())
|
||||
} else if (tk.isKeyword() || isQtKeyword(tk.text()) || tk.isObjCAtKeyword() || tk.isObjCTypeQualifier())
|
||||
setFormat(tk.position(), tk.length(), m_formats[CppKeywordFormat]);
|
||||
|
||||
else if (tk.isOperator())
|
||||
|
||||
Reference in New Issue
Block a user