Commit fa0ef522 authored by Roberto Raggi's avatar Roberto Raggi

UsingAST::lastToken().

parent 7d719a66
...@@ -2730,7 +2730,6 @@ unsigned UnaryExpressionAST::firstToken() const ...@@ -2730,7 +2730,6 @@ unsigned UnaryExpressionAST::firstToken() const
unsigned UnaryExpressionAST::lastToken() const unsigned UnaryExpressionAST::lastToken() const
{ {
assert(0 && "review me");
if (expression) if (expression)
return expression->lastToken(); return expression->lastToken();
return unary_op_token + 1; return unary_op_token + 1;
...@@ -2750,8 +2749,13 @@ unsigned UsingAST::firstToken() const ...@@ -2750,8 +2749,13 @@ unsigned UsingAST::firstToken() const
unsigned UsingAST::lastToken() const unsigned UsingAST::lastToken() const
{ {
assert(0 && "review me"); if (semicolon_token)
return semicolon_token + 1; return semicolon_token + 1;
else if (name)
return name->lastToken();
else if (typename_token)
return typename_token + 1;
return using_token + 1;
} }
void UsingDirectiveAST::accept0(ASTVisitor *visitor) void UsingDirectiveAST::accept0(ASTVisitor *visitor)
......
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