summaryrefslogtreecommitdiff
path: root/shared/cplusplus/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shared/cplusplus/AST.cpp')
-rw-r--r--shared/cplusplus/AST.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp
index 2841d003a3..67ff46ca4f 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)