diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2014-06-20 09:57:46 +0300 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-06-24 16:16:58 +0200 |
commit | ea4b4bff4084c801a56ed0915fa78612141302de (patch) | |
tree | 57b253abee749312eb8b5baa2ab4560234d56343 /src/libs/3rdparty/cplusplus/ASTMatch0.cpp | |
parent | cb079c5319b92419a6031759689b1a5c29aea5f5 (diff) |
C++: Split designator AST
Change-Id: I9bfed2023624c818c0f35f24476693cffeaf2bbc
Reviewed-by: Wang Hoi <wanghoi@126.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/ASTMatch0.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/ASTMatch0.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libs/3rdparty/cplusplus/ASTMatch0.cpp b/src/libs/3rdparty/cplusplus/ASTMatch0.cpp index efeb2c57e0..ff51efcd1a 100644 --- a/src/libs/3rdparty/cplusplus/ASTMatch0.cpp +++ b/src/libs/3rdparty/cplusplus/ASTMatch0.cpp @@ -1192,9 +1192,17 @@ bool BracedInitializerAST::match0(AST *pattern, ASTMatcher *matcher) return false; } -bool DesignatorAST::match0(AST *pattern, ASTMatcher *matcher) +bool DotDesignatorAST::match0(AST *pattern, ASTMatcher *matcher) { - if (DesignatorAST *_other = pattern->asDesignator()) + if (DotDesignatorAST *_other = pattern->asDotDesignator()) + return matcher->match(this, _other); + + return false; +} + +bool BracketDesignatorAST::match0(AST *pattern, ASTMatcher *matcher) +{ + if (BracketDesignatorAST *_other = pattern->asBracketDesignator()) return matcher->match(this, _other); return false; |