forked from qt-creator/qt-creator
Merge commit 'origin/1.3'
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -314,6 +314,14 @@ void Symbol::setScope(Scope *scope)
|
||||
_scope = scope;
|
||||
}
|
||||
|
||||
Symbol *Symbol::enclosingSymbol() const
|
||||
{
|
||||
if (! _scope)
|
||||
return 0;
|
||||
|
||||
return _scope->owner();
|
||||
}
|
||||
|
||||
Scope *Symbol::enclosingNamespaceScope() const
|
||||
{
|
||||
if (! _scope)
|
||||
|
||||
@@ -281,6 +281,8 @@ public:
|
||||
|
||||
bool isGenerated() const;
|
||||
|
||||
Symbol *enclosingSymbol() const;
|
||||
|
||||
/// Returns the eclosing namespace scope.
|
||||
Scope *enclosingNamespaceScope() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user