diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-12 16:30:43 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-12 16:55:32 +0200 |
commit | 47069717f82291e3c34a71b7ada44d26731248ee (patch) | |
tree | bb90e58b60e8b22f1233dce7cb923e9999c13f1e /src/shared/cplusplus/Bind.cpp | |
parent | ade1762af3b7a07a4a4cb9588fd96994842a7c69 (diff) | |
download | qt-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.cpp | 13 |
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); |