forked from qt-creator/qt-creator
@@ -168,10 +168,10 @@ protected:
|
|||||||
|
|
||||||
bool isDeclSymbol(Symbol *symbol) const
|
bool isDeclSymbol(Symbol *symbol) const
|
||||||
{
|
{
|
||||||
if (! symbol)
|
if (! symbol) {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
else if (symbol == _declSymbol) {
|
} else if (symbol == _declSymbol) {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else if (symbol->line() == _declSymbol->line() && symbol->column() == _declSymbol->column()) {
|
} else if (symbol->line() == _declSymbol->line() && symbol->column() == _declSymbol->column()) {
|
||||||
@@ -349,6 +349,20 @@ protected:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool visit(EnumeratorAST *ast)
|
||||||
|
{
|
||||||
|
Identifier *id = identifier(ast->identifier_token);
|
||||||
|
if (id == _id) {
|
||||||
|
LookupContext context = currentContext(ast);
|
||||||
|
const QList<Symbol *> candidates = context.resolve(control()->nameId(id));
|
||||||
|
reportResult(ast->identifier_token, candidates);
|
||||||
|
}
|
||||||
|
|
||||||
|
accept(ast->expression);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool visit(SimpleNameAST *ast)
|
virtual bool visit(SimpleNameAST *ast)
|
||||||
{
|
{
|
||||||
Identifier *id = identifier(ast->identifier_token);
|
Identifier *id = identifier(ast->identifier_token);
|
||||||
|
Reference in New Issue
Block a user