summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Bind.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-08-12 16:30:43 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-08-12 16:55:32 +0200
commit47069717f82291e3c34a71b7ada44d26731248ee (patch)
treebb90e58b60e8b22f1233dce7cb923e9999c13f1e /src/shared/cplusplus/Bind.cpp
parentade1762af3b7a07a4a4cb9588fd96994842a7c69 (diff)
downloadqt-creator-47069717f82291e3c34a71b7ada44d26731248ee.tar.gz
Added Bind::switchScope() and Bind::currentScope().
Diffstat (limited to 'src/shared/cplusplus/Bind.cpp')
-rw-r--r--src/shared/cplusplus/Bind.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Bind.cpp b/src/shared/cplusplus/Bind.cpp
index a7dc27f551..178aa9fe10 100644
--- a/src/shared/cplusplus/Bind.cpp
+++ b/src/shared/cplusplus/Bind.cpp
@@ -64,6 +64,7 @@ namespace { bool debug_todo = false; }
Bind::Bind(TranslationUnit *unit)
: ASTVisitor(unit),
+ _currentScope(0),
_currentExpression(0),
_currentName(0)
{
@@ -71,6 +72,18 @@ Bind::Bind(TranslationUnit *unit)
translationUnit(unit->ast()->asTranslationUnit());
}
+Scope *Bind::currentScope() const
+{
+ return _currentScope;
+}
+
+Scope *Bind::switchScope(Scope *scope)
+{
+ Scope *previousScope = _currentScope;
+ _currentScope = scope;
+ return previousScope;
+}
+
void Bind::statement(StatementAST *ast)
{
accept(ast);