diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:24:09 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:24:09 +0100 |
commit | 2fdbfe87efc26cc7927d39d59e63983cb0c01b93 (patch) | |
tree | e77e79fcda41192796be85d6692ed3b8a0627582 /shared/cplusplus/AST.cpp | |
parent | 95c199309059930acd198cf0bd635b237a6b36d2 (diff) | |
download | qt-creator-2fdbfe87efc26cc7927d39d59e63983cb0c01b93.tar.gz |
Implemented GotoStatementAST::lastToken().
Diffstat (limited to 'shared/cplusplus/AST.cpp')
-rw-r--r-- | shared/cplusplus/AST.cpp | 9 |
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) |