Commit 4fcadbdd authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Implemented LinkageBodyAST::lastToken().

parent 77c16d13
......@@ -1606,8 +1606,15 @@ unsigned LinkageBodyAST::firstToken() const
unsigned LinkageBodyAST::lastToken() const
{
assert(0 && "review me");
return rbrace_token + 1;
if (rbrace_token)
return rbrace_token + 1;
for (DeclarationAST *it = declarations; it; it = it->next) {
if (! it->next)
return it->lastToken();
}
return lbrace_token + 1;
}
void LinkageSpecificationAST::accept0(ASTVisitor *visitor)
......
Supports Markdown
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