forked from qt-creator/qt-creator
QmlJS: Add semantic highlighting.
Change-Id: If9293244075cff1a52801b50cdbb77248ecd21ea Reviewed-on: http://codereview.qt.nokia.com/3310 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <cplusplus/LookupContext.h>
|
||||
#include <texteditor/semantichighlighter.h>
|
||||
#include <QtCore/QHash>
|
||||
|
||||
namespace CppEditor {
|
||||
@@ -45,22 +46,13 @@ class CPPEditorWidget;
|
||||
class SemanticInfo
|
||||
{
|
||||
public:
|
||||
struct Use {
|
||||
unsigned line;
|
||||
unsigned column;
|
||||
unsigned length;
|
||||
unsigned kind;
|
||||
|
||||
enum Kind {
|
||||
Type = 0,
|
||||
Local,
|
||||
Field,
|
||||
Static,
|
||||
VirtualMethod
|
||||
};
|
||||
|
||||
Use(unsigned line = 0, unsigned column = 0, unsigned length = 0, unsigned kind = Type)
|
||||
: line(line), column(column), length(length), kind(kind) {}
|
||||
typedef TextEditor::SemanticHighlighter::Result Use;
|
||||
enum UseKind {
|
||||
TypeUse = 0,
|
||||
LocalUse,
|
||||
FieldUse,
|
||||
StaticUse,
|
||||
VirtualMethodUse
|
||||
};
|
||||
|
||||
typedef QHash<CPlusPlus::Symbol *, QList<Use> > LocalUseMap;
|
||||
|
||||
Reference in New Issue
Block a user