From 2fdbfe87efc26cc7927d39d59e63983cb0c01b93 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Mon, 5 Jan 2009 10:24:09 +0100 Subject: [PATCH] Implemented GotoStatementAST::lastToken(). --- shared/cplusplus/AST.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 2841d003a37..67ff46ca4fe 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -1529,8 +1529,13 @@ unsigned GotoStatementAST::firstToken() const unsigned GotoStatementAST::lastToken() const { - assert(0 && "review me"); - return semicolon_token + 1; + if (semicolon_token) + return semicolon_token + 1; + else if (identifier_token) + return identifier_token + 1; + else if (goto_token) + return goto_token + 1; + return 0; } void IfStatementAST::accept0(ASTVisitor *visitor)