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
F
flatpak-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
Marco Bubke
flatpak-qt-creator
Commits
5ceea60c
Commit
5ceea60c
authored
Jan 06, 2009
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SimpleDeclarationAST::lastToken().
parent
43bdddec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
shared/cplusplus/AST.cpp
shared/cplusplus/AST.cpp
+9
-6
No files found.
shared/cplusplus/AST.cpp
View file @
5ceea60c
...
...
@@ -2184,7 +2184,6 @@ unsigned ReferenceAST::firstToken() const
unsigned
ReferenceAST
::
lastToken
()
const
{
assert
(
0
&&
"review me"
);
return
amp_token
+
1
;
}
...
...
@@ -2202,8 +2201,11 @@ unsigned ReturnStatementAST::firstToken() const
unsigned
ReturnStatementAST
::
lastToken
()
const
{
assert
(
0
&&
"review me"
);
return
semicolon_token
+
1
;
if
(
semicolon_token
)
return
semicolon_token
+
1
;
else
if
(
expression
)
return
expression
->
lastToken
();
return
return_token
+
1
;
}
void
SimpleDeclarationAST
::
accept0
(
ASTVisitor
*
visitor
)
...
...
@@ -2222,23 +2224,24 @@ unsigned SimpleDeclarationAST::firstToken() const
return
decl_specifier_seq
->
firstToken
();
else
if
(
declarators
)
return
declarators
->
firstToken
();
else
return
semicolon_token
;
return
semicolon_token
;
}
unsigned
SimpleDeclarationAST
::
lastToken
()
const
{
assert
(
0
&&
"review me"
);
if
(
semicolon_token
)
return
semicolon_token
+
1
;
for
(
DeclaratorListAST
*
it
=
declarators
;
it
;
it
=
it
->
next
)
{
if
(
!
it
->
next
)
return
it
->
lastToken
();
}
for
(
SpecifierAST
*
it
=
decl_specifier_seq
;
it
;
it
=
it
->
next
)
{
if
(
!
it
->
next
)
return
it
->
lastToken
();
}
return
0
;
}
...
...
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