Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Hunger
qt-creator
Commits
47069717
Commit
47069717
authored
Aug 12, 2010
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Bind::switchScope() and Bind::currentScope().
parent
ade1762a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
src/shared/cplusplus/Bind.cpp
src/shared/cplusplus/Bind.cpp
+13
-0
src/shared/cplusplus/Bind.h
src/shared/cplusplus/Bind.h
+4
-0
No files found.
src/shared/cplusplus/Bind.cpp
View file @
47069717
...
...
@@ -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
);
...
...
src/shared/cplusplus/Bind.h
View file @
47069717
...
...
@@ -72,6 +72,9 @@ public:
FullySpecifiedType
coreDeclarator
(
CoreDeclaratorAST
*
ast
,
const
FullySpecifiedType
&
init
);
FullySpecifiedType
postfixDeclarator
(
PostfixDeclaratorAST
*
ast
,
const
FullySpecifiedType
&
init
);
Scope
*
currentScope
()
const
;
Scope
*
switchScope
(
Scope
*
scope
);
protected:
using
ASTVisitor
::
translationUnit
;
...
...
@@ -266,6 +269,7 @@ protected:
virtual
bool
visit
(
ArrayDeclaratorAST
*
ast
);
private:
Scope
*
_currentScope
;
ExpressionTy
_currentExpression
;
const
Name
*
_currentName
;
FullySpecifiedType
_currentType
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment