summaryrefslogtreecommitdiff
path: root/src/libs/3rdparty/cplusplus/AST.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2012-02-10 14:41:58 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2012-02-10 16:29:04 +0100
commit3f5dc36a5361c9c7e515e6213bf5c6e64e4dd7bd (patch)
treea53e577c56cdfda1ee4151084e8b82ec3540d778 /src/libs/3rdparty/cplusplus/AST.cpp
parent07d335b21525be20d36cb9a1fe017497184016e0 (diff)
downloadqt-creator-3f5dc36a5361c9c7e515e6213bf5c6e64e4dd7bd.tar.gz
C++11: first set of changes for decltype.
Change-Id: I49d6ff7eb1805cd07bdfcb27bb37d4c6cadc9115 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/AST.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/AST.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/libs/3rdparty/cplusplus/AST.cpp b/src/libs/3rdparty/cplusplus/AST.cpp
index 109cc63455..445afe8123 100644
--- a/src/libs/3rdparty/cplusplus/AST.cpp
+++ b/src/libs/3rdparty/cplusplus/AST.cpp
@@ -4313,3 +4313,33 @@ unsigned StaticAssertDeclarationAST::lastToken() const
return 1;
}
+/** \generated */
+unsigned DecltypeSpecifierAST::firstToken() const
+{
+ if (decltype_token)
+ return decltype_token;
+ if (lparen_token)
+ return lparen_token;
+ if (expression)
+ if (unsigned candidate = expression->firstToken())
+ return candidate;
+ if (rparen_token)
+ return rparen_token;
+ return 0;
+}
+
+/** \generated */
+unsigned DecltypeSpecifierAST::lastToken() const
+{
+ if (rparen_token)
+ return rparen_token + 1;
+ if (expression)
+ if (unsigned candidate = expression->lastToken())
+ return candidate;
+ if (lparen_token)
+ return lparen_token + 1;
+ if (decltype_token)
+ return decltype_token + 1;
+ return 1;
+}
+