Split LookupContext::lookup() in lookup() and find().

lookup() searches for symbols in the given binding and the enclosing scopes,
while find() searches for symbols only in the given binding.
This commit is contained in:
Roberto Raggi
2010-05-11 10:20:51 +02:00
parent 7446f5cae2
commit 37fde0c9d4
3 changed files with 20 additions and 7 deletions

View File

@@ -56,6 +56,7 @@ public:
ClassOrNamespace *globalNamespace() const;
QList<Symbol *> lookup(const Name *name);
QList<Symbol *> find(const Name *name);
ClassOrNamespace *lookupClassOrNamespace(const Name *name);
ClassOrNamespace *findClassOrNamespace(const Name *name);
@@ -68,6 +69,8 @@ private:
/// \internal
ClassOrNamespace *findOrCreate(const Name *name);
QList<Symbol *> lookup_helper(const Name *name, bool searchInEnclosingScope);
void addTodo(Symbol *symbol);
void addSymbol(Symbol *symbol);
void addEnum(Enum *e);