Ported completeScope(), completeNamespace() and completeClass() to use the new LookupContext.

This commit is contained in:
Roberto Raggi
2010-05-05 10:59:46 +02:00
parent 9eea78d7f1
commit 66a9ef0725
4 changed files with 158 additions and 50 deletions

View File

@@ -138,6 +138,16 @@ ClassOrNamespace *LookupContext::classOrNamespace(Symbol *symbol) const
return bindings()->findClassOrNamespace(symbol);
}
ClassOrNamespace *LookupContext::classOrNamespace(const Name *name, Symbol *lastVisibleSymbol) const
{
Scope *scope = _thisDocument->globalSymbols();
if (lastVisibleSymbol && lastVisibleSymbol->scope())
scope = lastVisibleSymbol->scope();
return classOrNamespace(name, lastVisibleSymbol);
}
QList<Symbol *> LookupContext::lookup(const Name *name, Scope *scope) const
{
QList<Symbol *> candidates;