diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-13 12:36:51 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-13 12:38:18 +0100 |
commit | baffd97efb1fd6da004fedf620577f8a97445793 (patch) | |
tree | 5131ff5b8f40d3d76ae9ed993093f1668b7a7c31 /src/shared/cplusplus/ASTMatcher.cpp | |
parent | 28ab85b13794f2443cfd714bbf1daa5e91bc6b2a (diff) | |
download | qt-creator-baffd97efb1fd6da004fedf620577f8a97445793.tar.gz |
Fixed parsing of ctor-initializers and added a manual test for the AST matchers
Diffstat (limited to 'src/shared/cplusplus/ASTMatcher.cpp')
-rw-r--r-- | src/shared/cplusplus/ASTMatcher.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/cplusplus/ASTMatcher.cpp b/src/shared/cplusplus/ASTMatcher.cpp index ec31e0e3d9..47dac58232 100644 --- a/src/shared/cplusplus/ASTMatcher.cpp +++ b/src/shared/cplusplus/ASTMatcher.cpp @@ -31,6 +31,7 @@ #include "ASTMatcher.h" #include "Control.h" #include "TranslationUnit.h" +#include "Literals.h" using namespace CPlusPlus; @@ -54,7 +55,7 @@ bool ASTMatcher::matchToken(unsigned tokenIndex, unsigned patternTokenIndex) con if (token.f.kind != otherToken.f.kind) return false; else if (token.is(T_IDENTIFIER)) { - if (token.identifier != otherToken.identifier) + if (! token.identifier->isEqualTo(otherToken.identifier)) return false; } return true; @@ -636,7 +637,7 @@ bool ASTMatcher::match(MemInitializerAST *node, MemInitializerAST *pattern) return false; if (! matchToken(node->lparen_token, pattern->lparen_token)) return false; - if (! AST::match(node->expression, pattern->expression, this)) + if (! AST::match(node->expression_list, pattern->expression_list, this)) return false; if (! matchToken(node->rparen_token, pattern->rparen_token)) return false; |