Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
6f8b3d3d
Commit
6f8b3d3d
authored
Jan 06, 2009
by
Roberto Raggi
Browse files
Implemented NewExpressionAST::lastToken() and NewInitializerAST::lastToken().
parent
bdfd5cad
Changes
1
Hide whitespace changes
Inline
Side-by-side
shared/cplusplus/AST.cpp
View file @
6f8b3d3d
...
...
@@ -1860,7 +1860,6 @@ unsigned NewExpressionAST::firstToken() const
unsigned
NewExpressionAST
::
lastToken
()
const
{
assert
(
0
&&
"review me"
);
if
(
new_initializer
)
return
new_initializer
->
lastToken
();
else
if
(
new_type_id
)
...
...
@@ -1869,7 +1868,12 @@ unsigned NewExpressionAST::lastToken() const
return
type_id
->
lastToken
();
else
if
(
expression
)
return
expression
->
lastToken
();
return
new_token
+
1
;
else
if
(
new_token
)
return
new_token
+
1
;
else
if
(
scope_token
)
return
scope_token
+
1
;
// ### assert?
return
0
;
}
void
NewInitializerAST
::
accept0
(
ASTVisitor
*
visitor
)
...
...
@@ -1886,8 +1890,11 @@ unsigned NewInitializerAST::firstToken() const
unsigned
NewInitializerAST
::
lastToken
()
const
{
assert
(
0
&&
"review me"
);
return
rparen_token
+
1
;
if
(
rparen_token
)
return
rparen_token
+
1
;
else
if
(
expression
)
return
expression
->
lastToken
();
return
lparen_token
+
1
;
}
void
NewTypeIdAST
::
accept0
(
ASTVisitor
*
visitor
)
...
...
Write
Preview
Supports
Markdown
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