Improved support for private classes.

This commit is contained in:
Roberto Raggi
2009-10-12 12:00:40 +02:00
parent eacb27f1fb
commit 99c3327719
3 changed files with 69 additions and 15 deletions

View File

@@ -208,6 +208,21 @@ void Scope::enterSymbol(Symbol *symbol)
}
}
Symbol *Scope::lookat(Name *name) const
{
if (! name)
return 0;
else if (OperatorNameId *opId = name->asOperatorNameId())
return lookat(opId->kind());
else if (Identifier *id = name->identifier())
return lookat(id);
else
return 0;
}
Symbol *Scope::lookat(Identifier *id) const
{
if (! _hash || ! id)

View File

@@ -129,6 +129,7 @@ public:
/// Returns the last Symbol in the scope.
iterator lastSymbol() const;
Symbol *lookat(Name *name) const;
Symbol *lookat(Identifier *id) const;
Symbol *lookat(int operatorId) const;