Rename the given enumerator.

This commit is contained in:
Roberto Raggi
2009-10-13 14:38:37 +02:00
parent 14058c07ec
commit c33a8e9498

View File

@@ -188,10 +188,10 @@ protected:
bool isDeclSymbol(Symbol *symbol) const
{
if (! symbol)
if (! symbol) {
return false;
else if (symbol == _declSymbol) {
} else if (symbol == _declSymbol) {
return true;
} else if (symbol->line() == _declSymbol->line() && symbol->column() == _declSymbol->column()) {
@@ -369,6 +369,20 @@ protected:
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)
{
Identifier *id = identifier(ast->identifier_token);