From 77c16d13172cad7a801a30ab53953dee04418f01 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Mon, 5 Jan 2009 10:27:49 +0100 Subject: [PATCH] Implemented LabeledStatementAST::lastToken(). --- shared/cplusplus/AST.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 33de30e968f..f75fcf12a41 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -1583,10 +1583,11 @@ unsigned LabeledStatementAST::firstToken() const unsigned LabeledStatementAST::lastToken() const { - assert(0 && "review me"); if (statement) return statement->lastToken(); - return colon_token + 1; + else if (colon_token) + return colon_token + 1; + return label_token + 1; } void LinkageBodyAST::accept0(ASTVisitor *visitor)