summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/ASTMatcher.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-03-25 12:15:38 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2010-03-25 12:16:18 +0100
commitfe261bc256abb3e470a0e33a4b7569307e973db5 (patch)
tree6f359760d060f3a347e060ae4647ac92639ef252 /src/shared/cplusplus/ASTMatcher.cpp
parent1bdae0815d20f9a93c57b14f52dd69a808b739c6 (diff)
downloadqt-creator-fe261bc256abb3e470a0e33a4b7569307e973db5.tar.gz
Parse C++ 0x argument packs.
Diffstat (limited to 'src/shared/cplusplus/ASTMatcher.cpp')
-rw-r--r--src/shared/cplusplus/ASTMatcher.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/shared/cplusplus/ASTMatcher.cpp b/src/shared/cplusplus/ASTMatcher.cpp
index e6c447823b..4be5014abd 100644
--- a/src/shared/cplusplus/ASTMatcher.cpp
+++ b/src/shared/cplusplus/ASTMatcher.cpp
@@ -1808,6 +1808,8 @@ bool ASTMatcher::match(SizeofExpressionAST *node, SizeofExpressionAST *pattern)
pattern->sizeof_token = node->sizeof_token;
+ pattern->dot_dot_dot_token = node->dot_dot_dot_token;
+
pattern->lparen_token = node->lparen_token;
if (! pattern->expression)
@@ -2796,3 +2798,22 @@ bool ASTMatcher::match(TrailingReturnTypeAST *node, TrailingReturnTypeAST *patte
return true;
}
+bool ASTMatcher::match(BracedInitializerAST *node, BracedInitializerAST *pattern)
+{
+ (void) node;
+ (void) pattern;
+
+ pattern->lbrace_token = node->lbrace_token;
+
+ if (! pattern->expression_list)
+ pattern->expression_list = node->expression_list;
+ else if (! AST::match(node->expression_list, pattern->expression_list, this))
+ return false;
+
+ pattern->comma_token = node->comma_token;
+
+ pattern->rbrace_token = node->rbrace_token;
+
+ return true;
+}
+