Commit 083ea37e authored by Roberto Raggi's avatar Roberto Raggi Committed by con

Rename the given enumerator.

(cherry picked from commit c33a8e94)
parent 15118700
......@@ -168,10 +168,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()) {
......@@ -349,6 +349,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment