forked from qt-creator/qt-creator
C++: highlighter clean-ups
- Moved TextEditor::SemanticHighlighter::Result to TextEditor::HighlightingResult - Moved SemanticInfo::UseKind to CppHighlightingSupport::Kind Change-Id: I14faab1891ca691a0691cfd9243edf19fcd3d3df Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "cpphighlightingsupport.h"
|
||||
#include "cpplocalsymbols.h"
|
||||
|
||||
#include "cppsemanticinfo.h"
|
||||
@@ -73,6 +74,8 @@ protected:
|
||||
using ASTVisitor::visit;
|
||||
using ASTVisitor::endVisit;
|
||||
|
||||
typedef TextEditor::HighlightingResult HighlightingResult;
|
||||
|
||||
void enterScope(Scope *scope)
|
||||
{
|
||||
_scopeStack.append(scope);
|
||||
@@ -86,7 +89,9 @@ protected:
|
||||
const Identifier *id = member->identifier();
|
||||
unsigned line, column;
|
||||
getTokenStartPosition(member->sourceLocation(), &line, &column);
|
||||
localUses[member].append(SemanticInfo::Use(line, column, id->size(), SemanticInfo::LocalUse));
|
||||
localUses[member].append(
|
||||
HighlightingResult(line, column, id->size(),
|
||||
CppHighlightingSupport::LocalUse));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,7 +112,9 @@ protected:
|
||||
else if (!member->isGenerated() && (member->sourceLocation() < firstToken || member->enclosingScope()->isFunction())) {
|
||||
unsigned line, column;
|
||||
getTokenStartPosition(simpleName->identifier_token, &line, &column);
|
||||
localUses[member].append(SemanticInfo::Use(line, column, id->size(), SemanticInfo::LocalUse));
|
||||
localUses[member].append(
|
||||
HighlightingResult(line, column, id->size(),
|
||||
CppHighlightingSupport::LocalUse));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user