Commit 57cf35a3 authored by Roberto Raggi's avatar Roberto Raggi

ParamterDeclarationAST::lastToken() and ParameterDeclarationClauseAST::lastToken().

parent b563081e
......@@ -1999,17 +1999,17 @@ unsigned ParameterDeclarationAST::firstToken() const
unsigned ParameterDeclarationAST::lastToken() const
{
assert(0 && "review me");
if (expression)
return expression->lastToken();
else if (equal_token)
return equal_token + 1;
else if (declarator)
return declarator->lastToken();
for (SpecifierAST *it = type_specifier; it; it = it->next) {
for (SpecifierAST *it = type_specifier; it; it = it->next) {
if (! it->next)
return it->lastToken();
}
// ### assert?
return 0;
}
......@@ -2031,7 +2031,6 @@ unsigned ParameterDeclarationClauseAST::firstToken() const
unsigned ParameterDeclarationClauseAST::lastToken() const
{
assert(0 && "review me");
if (dot_dot_dot_token)
return dot_dot_dot_token + 1;
return parameter_declarations->lastToken();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment