Commit fdd77d8c authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Implemented NamespaceAST::lastToken().

parent cc838218
......@@ -1696,7 +1696,6 @@ unsigned NamedTypeSpecifierAST::firstToken() const
unsigned NamedTypeSpecifierAST::lastToken() const
{
assert(0 && "review me");
return name->lastToken();
}
......@@ -1717,11 +1716,17 @@ unsigned NamespaceAST::firstToken() const
unsigned NamespaceAST::lastToken() const
{
assert(0 && "review me");
if (linkage_body)
return linkage_body->lastToken();
for (SpecifierAST *it = attributes; it; it = it->next) {
if (! it->next)
return it->lastToken();
}
if (identifier_token)
return identifier_token + 1;
return namespace_token + 1;
}
......
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