Enabled the template instantiation.

This commit is contained in:
Roberto Raggi
2010-08-11 15:34:02 +02:00
parent f446363d63
commit 97d93ed32d
3 changed files with 15 additions and 6 deletions

View File

@@ -251,6 +251,15 @@ Namespace *Symbol::enclosingNamespace() const
return 0;
}
Template *Symbol::enclosingTemplate() const
{
for (Scope *s = _scope; s; s = s->scope()) {
if (Template *templ = s->asTemplate())
return templ;
}
return 0;
}
Class *Symbol::enclosingClass() const
{
for (Scope *s = _scope; s; s = s->scope()) {

View File

@@ -292,6 +292,9 @@ public:
/// Returns the eclosing namespace scope.
Namespace *enclosingNamespace() const;
/// Returns the eclosing template scope.
Template *enclosingTemplate() const;
/// Returns the enclosing class scope.
Class *enclosingClass() const;