Skip to content
Snippets Groups Projects
Commit c33a8e94 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Rename the given enumerator.

parent 14058c07
No related branches found
No related tags found
No related merge requests found
...@@ -188,10 +188,10 @@ protected: ...@@ -188,10 +188,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()) {
...@@ -369,6 +369,20 @@ protected: ...@@ -369,6 +369,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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment