Commit 38be5640 authored by Roberto Raggi's avatar Roberto Raggi

WhileStatementAST::lastToken().

parent 7c6c439c
......@@ -2796,10 +2796,15 @@ unsigned WhileStatementAST::firstToken() const
unsigned WhileStatementAST::lastToken() const
{
assert(0 && "review me");
if (statement)
return statement->lastToken();
return rparen_token + 1;
else if (rparen_token)
return rparen_token + 1;
else if (condition)
return condition->lastToken();
else if (lparen_token)
return lparen_token + 1;
return while_token + 1;
}
CPLUSPLUS_END_NAMESPACE
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