diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-13 11:35:19 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-13 11:35:19 +0100 |
commit | ecf712e6bc51dd65a0a414d1fa044aba19ab26cf (patch) | |
tree | 5b2112a370770af66dd3a589d430779619bda1a6 /src/shared/cplusplus/ASTMatch0.cpp | |
parent | 261b8700343980b7da17eed3d00779b44e67e64c (diff) | |
download | qt-creator-ecf712e6bc51dd65a0a414d1fa044aba19ab26cf.tar.gz |
New matchers
Diffstat (limited to 'src/shared/cplusplus/ASTMatch0.cpp')
-rw-r--r-- | src/shared/cplusplus/ASTMatch0.cpp | 1350 |
1 files changed, 366 insertions, 984 deletions
diff --git a/src/shared/cplusplus/ASTMatch0.cpp b/src/shared/cplusplus/ASTMatch0.cpp index a6522b5407..7c4ff19ae6 100644 --- a/src/shared/cplusplus/ASTMatch0.cpp +++ b/src/shared/cplusplus/ASTMatch0.cpp @@ -34,1595 +34,977 @@ using namespace CPlusPlus; bool SimpleSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) { - if (SimpleSpecifierAST *_other = pattern->asSimpleSpecifier()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (SimpleSpecifierAST *_other = pattern->asSimpleSpecifier()) + return matcher->match(this, _other); + return false; } bool AttributeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) { - if (AttributeSpecifierAST *_other = pattern->asAttributeSpecifier()) { - if (! matcher->match(this, _other)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - return true; - } + if (AttributeSpecifierAST *_other = pattern->asAttributeSpecifier()) + return matcher->match(this, _other); + return false; } bool AttributeAST::match0(AST *pattern, ASTMatcher *matcher) { - if (AttributeAST *_other = pattern->asAttribute()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression_list, _other->expression_list, matcher)) - return false; - return true; - } + if (AttributeAST *_other = pattern->asAttribute()) + return matcher->match(this, _other); + return false; } bool TypeofSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TypeofSpecifierAST *_other = pattern->asTypeofSpecifier()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (TypeofSpecifierAST *_other = pattern->asTypeofSpecifier()) + return matcher->match(this, _other); + return false; } bool DeclaratorAST::match0(AST *pattern, ASTMatcher *matcher) { - if (DeclaratorAST *_other = pattern->asDeclarator()) { - if (! matcher->match(this, _other)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - if (! match(ptr_operator_list, _other->ptr_operator_list, matcher)) - return false; - if (! match(core_declarator, _other->core_declarator, matcher)) - return false; - if (! match(postfix_declarator_list, _other->postfix_declarator_list, matcher)) - return false; - if (! match(post_attribute_list, _other->post_attribute_list, matcher)) - return false; - if (! match(initializer, _other->initializer, matcher)) - return false; - return true; - } + if (DeclaratorAST *_other = pattern->asDeclarator()) + return matcher->match(this, _other); + return false; } bool SimpleDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (SimpleDeclarationAST *_other = pattern->asSimpleDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(decl_specifier_list, _other->decl_specifier_list, matcher)) - return false; - if (! match(declarator_list, _other->declarator_list, matcher)) - return false; - return true; - } + if (SimpleDeclarationAST *_other = pattern->asSimpleDeclaration()) + return matcher->match(this, _other); + return false; } bool EmptyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (EmptyDeclarationAST *_other = pattern->asEmptyDeclaration()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (EmptyDeclarationAST *_other = pattern->asEmptyDeclaration()) + return matcher->match(this, _other); + return false; } bool AccessDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (AccessDeclarationAST *_other = pattern->asAccessDeclaration()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (AccessDeclarationAST *_other = pattern->asAccessDeclaration()) + return matcher->match(this, _other); + return false; } bool AsmDefinitionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (AsmDefinitionAST *_other = pattern->asAsmDefinition()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (AsmDefinitionAST *_other = pattern->asAsmDefinition()) + return matcher->match(this, _other); + return false; } bool BaseSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) { - if (BaseSpecifierAST *_other = pattern->asBaseSpecifier()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - return true; - } + if (BaseSpecifierAST *_other = pattern->asBaseSpecifier()) + return matcher->match(this, _other); + return false; } bool CompoundLiteralAST::match0(AST *pattern, ASTMatcher *matcher) { - if (CompoundLiteralAST *_other = pattern->asCompoundLiteral()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_id, _other->type_id, matcher)) - return false; - if (! match(initializer, _other->initializer, matcher)) - return false; - return true; - } + if (CompoundLiteralAST *_other = pattern->asCompoundLiteral()) + return matcher->match(this, _other); + return false; } bool QtMethodAST::match0(AST *pattern, ASTMatcher *matcher) { - if (QtMethodAST *_other = pattern->asQtMethod()) { - if (! matcher->match(this, _other)) - return false; - if (! match(declarator, _other->declarator, matcher)) - return false; - return true; - } + if (QtMethodAST *_other = pattern->asQtMethod()) + return matcher->match(this, _other); + return false; } bool BinaryExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (BinaryExpressionAST *_other = pattern->asBinaryExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(left_expression, _other->left_expression, matcher)) - return false; - if (! match(right_expression, _other->right_expression, matcher)) - return false; - return true; - } + if (BinaryExpressionAST *_other = pattern->asBinaryExpression()) + return matcher->match(this, _other); + return false; } bool CastExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (CastExpressionAST *_other = pattern->asCastExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_id, _other->type_id, matcher)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (CastExpressionAST *_other = pattern->asCastExpression()) + return matcher->match(this, _other); + return false; } bool ClassSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ClassSpecifierAST *_other = pattern->asClassSpecifier()) { - if (! matcher->match(this, _other)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - if (! match(name, _other->name, matcher)) - return false; - if (! match(base_clause_list, _other->base_clause_list, matcher)) - return false; - if (! match(member_specifier_list, _other->member_specifier_list, matcher)) - return false; - return true; - } + if (ClassSpecifierAST *_other = pattern->asClassSpecifier()) + return matcher->match(this, _other); + return false; } bool CaseStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (CaseStatementAST *_other = pattern->asCaseStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - return true; - } + if (CaseStatementAST *_other = pattern->asCaseStatement()) + return matcher->match(this, _other); + return false; } bool CompoundStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (CompoundStatementAST *_other = pattern->asCompoundStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(statement_list, _other->statement_list, matcher)) - return false; - return true; - } + if (CompoundStatementAST *_other = pattern->asCompoundStatement()) + return matcher->match(this, _other); + return false; } bool ConditionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ConditionAST *_other = pattern->asCondition()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_specifier_list, _other->type_specifier_list, matcher)) - return false; - if (! match(declarator, _other->declarator, matcher)) - return false; - return true; - } + if (ConditionAST *_other = pattern->asCondition()) + return matcher->match(this, _other); + return false; } bool ConditionalExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ConditionalExpressionAST *_other = pattern->asConditionalExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(condition, _other->condition, matcher)) - return false; - if (! match(left_expression, _other->left_expression, matcher)) - return false; - if (! match(right_expression, _other->right_expression, matcher)) - return false; - return true; - } + if (ConditionalExpressionAST *_other = pattern->asConditionalExpression()) + return matcher->match(this, _other); + return false; } bool CppCastExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (CppCastExpressionAST *_other = pattern->asCppCastExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_id, _other->type_id, matcher)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (CppCastExpressionAST *_other = pattern->asCppCastExpression()) + return matcher->match(this, _other); + return false; } bool CtorInitializerAST::match0(AST *pattern, ASTMatcher *matcher) { - if (CtorInitializerAST *_other = pattern->asCtorInitializer()) { - if (! matcher->match(this, _other)) - return false; - if (! match(member_initializer_list, _other->member_initializer_list, matcher)) - return false; - return true; - } + if (CtorInitializerAST *_other = pattern->asCtorInitializer()) + return matcher->match(this, _other); + return false; } bool DeclarationStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (DeclarationStatementAST *_other = pattern->asDeclarationStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(declaration, _other->declaration, matcher)) - return false; - return true; - } + if (DeclarationStatementAST *_other = pattern->asDeclarationStatement()) + return matcher->match(this, _other); + return false; } bool DeclaratorIdAST::match0(AST *pattern, ASTMatcher *matcher) { - if (DeclaratorIdAST *_other = pattern->asDeclaratorId()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - return true; - } + if (DeclaratorIdAST *_other = pattern->asDeclaratorId()) + return matcher->match(this, _other); + return false; } bool NestedDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NestedDeclaratorAST *_other = pattern->asNestedDeclarator()) { - if (! matcher->match(this, _other)) - return false; - if (! match(declarator, _other->declarator, matcher)) - return false; - return true; - } + if (NestedDeclaratorAST *_other = pattern->asNestedDeclarator()) + return matcher->match(this, _other); + return false; } bool FunctionDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher) { - if (FunctionDeclaratorAST *_other = pattern->asFunctionDeclarator()) { - if (! matcher->match(this, _other)) - return false; - if (! match(parameters, _other->parameters, matcher)) - return false; - if (! match(cv_qualifier_list, _other->cv_qualifier_list, matcher)) - return false; - if (! match(exception_specification, _other->exception_specification, matcher)) - return false; - if (! match(as_cpp_initializer, _other->as_cpp_initializer, matcher)) - return false; - return true; - } + if (FunctionDeclaratorAST *_other = pattern->asFunctionDeclarator()) + return matcher->match(this, _other); + return false; } bool ArrayDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ArrayDeclaratorAST *_other = pattern->asArrayDeclarator()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (ArrayDeclaratorAST *_other = pattern->asArrayDeclarator()) + return matcher->match(this, _other); + return false; } bool DeleteExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (DeleteExpressionAST *_other = pattern->asDeleteExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (DeleteExpressionAST *_other = pattern->asDeleteExpression()) + return matcher->match(this, _other); + return false; } bool DoStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (DoStatementAST *_other = pattern->asDoStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (DoStatementAST *_other = pattern->asDoStatement()) + return matcher->match(this, _other); + return false; } bool NamedTypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NamedTypeSpecifierAST *_other = pattern->asNamedTypeSpecifier()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - return true; - } + if (NamedTypeSpecifierAST *_other = pattern->asNamedTypeSpecifier()) + return matcher->match(this, _other); + return false; } bool ElaboratedTypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ElaboratedTypeSpecifierAST *_other = pattern->asElaboratedTypeSpecifier()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - return true; - } + if (ElaboratedTypeSpecifierAST *_other = pattern->asElaboratedTypeSpecifier()) + return matcher->match(this, _other); + return false; } bool EnumSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) { - if (EnumSpecifierAST *_other = pattern->asEnumSpecifier()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - if (! match(enumerator_list, _other->enumerator_list, matcher)) - return false; - return true; - } + if (EnumSpecifierAST *_other = pattern->asEnumSpecifier()) + return matcher->match(this, _other); + return false; } bool EnumeratorAST::match0(AST *pattern, ASTMatcher *matcher) { - if (EnumeratorAST *_other = pattern->asEnumerator()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (EnumeratorAST *_other = pattern->asEnumerator()) + return matcher->match(this, _other); + return false; } bool ExceptionDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ExceptionDeclarationAST *_other = pattern->asExceptionDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_specifier_list, _other->type_specifier_list, matcher)) - return false; - if (! match(declarator, _other->declarator, matcher)) - return false; - return true; - } + if (ExceptionDeclarationAST *_other = pattern->asExceptionDeclaration()) + return matcher->match(this, _other); + return false; } bool ExceptionSpecificationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ExceptionSpecificationAST *_other = pattern->asExceptionSpecification()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_id_list, _other->type_id_list, matcher)) - return false; - return true; - } + if (ExceptionSpecificationAST *_other = pattern->asExceptionSpecification()) + return matcher->match(this, _other); + return false; } bool ExpressionOrDeclarationStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ExpressionOrDeclarationStatementAST *_other = pattern->asExpressionOrDeclarationStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - if (! match(declaration, _other->declaration, matcher)) - return false; - return true; - } + if (ExpressionOrDeclarationStatementAST *_other = pattern->asExpressionOrDeclarationStatement()) + return matcher->match(this, _other); + return false; } bool ExpressionStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ExpressionStatementAST *_other = pattern->asExpressionStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (ExpressionStatementAST *_other = pattern->asExpressionStatement()) + return matcher->match(this, _other); + return false; } bool FunctionDefinitionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (FunctionDefinitionAST *_other = pattern->asFunctionDefinition()) { - if (! matcher->match(this, _other)) - return false; - if (! match(decl_specifier_list, _other->decl_specifier_list, matcher)) - return false; - if (! match(declarator, _other->declarator, matcher)) - return false; - if (! match(ctor_initializer, _other->ctor_initializer, matcher)) - return false; - if (! match(function_body, _other->function_body, matcher)) - return false; - return true; - } + if (FunctionDefinitionAST *_other = pattern->asFunctionDefinition()) + return matcher->match(this, _other); + return false; } bool ForeachStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ForeachStatementAST *_other = pattern->asForeachStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_specifier_list, _other->type_specifier_list, matcher)) - return false; - if (! match(declarator, _other->declarator, matcher)) - return false; - if (! match(initializer, _other->initializer, matcher)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - return true; - } + if (ForeachStatementAST *_other = pattern->asForeachStatement()) + return matcher->match(this, _other); + return false; } bool ForStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ForStatementAST *_other = pattern->asForStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(initializer, _other->initializer, matcher)) - return false; - if (! match(condition, _other->condition, matcher)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - return true; - } + if (ForStatementAST *_other = pattern->asForStatement()) + return matcher->match(this, _other); + return false; } bool IfStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (IfStatementAST *_other = pattern->asIfStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(condition, _other->condition, matcher)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - if (! match(else_statement, _other->else_statement, matcher)) - return false; - return true; - } + if (IfStatementAST *_other = pattern->asIfStatement()) + return matcher->match(this, _other); + return false; } bool ArrayInitializerAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ArrayInitializerAST *_other = pattern->asArrayInitializer()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression_list, _other->expression_list, matcher)) - return false; - return true; - } + if (ArrayInitializerAST *_other = pattern->asArrayInitializer()) + return matcher->match(this, _other); + return false; } bool LabeledStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (LabeledStatementAST *_other = pattern->asLabeledStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - return true; - } + if (LabeledStatementAST *_other = pattern->asLabeledStatement()) + return matcher->match(this, _other); + return false; } bool LinkageBodyAST::match0(AST *pattern, ASTMatcher *matcher) { - if (LinkageBodyAST *_other = pattern->asLinkageBody()) { - if (! matcher->match(this, _other)) - return false; - if (! match(declaration_list, _other->declaration_list, matcher)) - return false; - return true; - } + if (LinkageBodyAST *_other = pattern->asLinkageBody()) + return matcher->match(this, _other); + return false; } bool LinkageSpecificationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (LinkageSpecificationAST *_other = pattern->asLinkageSpecification()) { - if (! matcher->match(this, _other)) - return false; - if (! match(declaration, _other->declaration, matcher)) - return false; - return true; - } + if (LinkageSpecificationAST *_other = pattern->asLinkageSpecification()) + return matcher->match(this, _other); + return false; } bool MemInitializerAST::match0(AST *pattern, ASTMatcher *matcher) { - if (MemInitializerAST *_other = pattern->asMemInitializer()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (MemInitializerAST *_other = pattern->asMemInitializer()) + return matcher->match(this, _other); + return false; } bool NestedNameSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NestedNameSpecifierAST *_other = pattern->asNestedNameSpecifier()) { - if (! matcher->match(this, _other)) - return false; - if (! match(class_or_namespace_name, _other->class_or_namespace_name, matcher)) - return false; - return true; - } + if (NestedNameSpecifierAST *_other = pattern->asNestedNameSpecifier()) + return matcher->match(this, _other); + return false; } bool QualifiedNameAST::match0(AST *pattern, ASTMatcher *matcher) { - if (QualifiedNameAST *_other = pattern->asQualifiedName()) { - if (! matcher->match(this, _other)) - return false; - if (! match(nested_name_specifier_list, _other->nested_name_specifier_list, matcher)) - return false; - if (! match(unqualified_name, _other->unqualified_name, matcher)) - return false; - return true; - } + if (QualifiedNameAST *_other = pattern->asQualifiedName()) + return matcher->match(this, _other); + return false; } bool OperatorFunctionIdAST::match0(AST *pattern, ASTMatcher *matcher) { - if (OperatorFunctionIdAST *_other = pattern->asOperatorFunctionId()) { - if (! matcher->match(this, _other)) - return false; - if (! match(op, _other->op, matcher)) - return false; - return true; - } + if (OperatorFunctionIdAST *_other = pattern->asOperatorFunctionId()) + return matcher->match(this, _other); + return false; } bool ConversionFunctionIdAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ConversionFunctionIdAST *_other = pattern->asConversionFunctionId()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_specifier_list, _other->type_specifier_list, matcher)) - return false; - if (! match(ptr_operator_list, _other->ptr_operator_list, matcher)) - return false; - return true; - } + if (ConversionFunctionIdAST *_other = pattern->asConversionFunctionId()) + return matcher->match(this, _other); + return false; } bool SimpleNameAST::match0(AST *pattern, ASTMatcher *matcher) { - if (SimpleNameAST *_other = pattern->asSimpleName()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (SimpleNameAST *_other = pattern->asSimpleName()) + return matcher->match(this, _other); + return false; } bool DestructorNameAST::match0(AST *pattern, ASTMatcher *matcher) { - if (DestructorNameAST *_other = pattern->asDestructorName()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (DestructorNameAST *_other = pattern->asDestructorName()) + return matcher->match(this, _other); + return false; } bool TemplateIdAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TemplateIdAST *_other = pattern->asTemplateId()) { - if (! matcher->match(this, _other)) - return false; - if (! match(template_argument_list, _other->template_argument_list, matcher)) - return false; - return true; - } + if (TemplateIdAST *_other = pattern->asTemplateId()) + return matcher->match(this, _other); + return false; } bool NamespaceAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NamespaceAST *_other = pattern->asNamespace()) { - if (! matcher->match(this, _other)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - if (! match(linkage_body, _other->linkage_body, matcher)) - return false; - return true; - } + if (NamespaceAST *_other = pattern->asNamespace()) + return matcher->match(this, _other); + return false; } bool NamespaceAliasDefinitionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NamespaceAliasDefinitionAST *_other = pattern->asNamespaceAliasDefinition()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - return true; - } + if (NamespaceAliasDefinitionAST *_other = pattern->asNamespaceAliasDefinition()) + return matcher->match(this, _other); + return false; } bool NewPlacementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NewPlacementAST *_other = pattern->asNewPlacement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression_list, _other->expression_list, matcher)) - return false; - return true; - } + if (NewPlacementAST *_other = pattern->asNewPlacement()) + return matcher->match(this, _other); + return false; } bool NewArrayDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NewArrayDeclaratorAST *_other = pattern->asNewArrayDeclarator()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (NewArrayDeclaratorAST *_other = pattern->asNewArrayDeclarator()) + return matcher->match(this, _other); + return false; } bool NewExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NewExpressionAST *_other = pattern->asNewExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(new_placement, _other->new_placement, matcher)) - return false; - if (! match(type_id, _other->type_id, matcher)) - return false; - if (! match(new_type_id, _other->new_type_id, matcher)) - return false; - if (! match(new_initializer, _other->new_initializer, matcher)) - return false; - return true; - } + if (NewExpressionAST *_other = pattern->asNewExpression()) + return matcher->match(this, _other); + return false; } bool NewInitializerAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NewInitializerAST *_other = pattern->asNewInitializer()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (NewInitializerAST *_other = pattern->asNewInitializer()) + return matcher->match(this, _other); + return false; } bool NewTypeIdAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NewTypeIdAST *_other = pattern->asNewTypeId()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_specifier_list, _other->type_specifier_list, matcher)) - return false; - if (! match(ptr_operator_list, _other->ptr_operator_list, matcher)) - return false; - if (! match(new_array_declarator_list, _other->new_array_declarator_list, matcher)) - return false; - return true; - } + if (NewTypeIdAST *_other = pattern->asNewTypeId()) + return matcher->match(this, _other); + return false; } bool OperatorAST::match0(AST *pattern, ASTMatcher *matcher) { - if (OperatorAST *_other = pattern->asOperator()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (OperatorAST *_other = pattern->asOperator()) + return matcher->match(this, _other); + return false; } bool ParameterDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ParameterDeclarationAST *_other = pattern->asParameterDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_specifier_list, _other->type_specifier_list, matcher)) - return false; - if (! match(declarator, _other->declarator, matcher)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (ParameterDeclarationAST *_other = pattern->asParameterDeclaration()) + return matcher->match(this, _other); + return false; } bool ParameterDeclarationClauseAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ParameterDeclarationClauseAST *_other = pattern->asParameterDeclarationClause()) { - if (! matcher->match(this, _other)) - return false; - if (! match(parameter_declaration_list, _other->parameter_declaration_list, matcher)) - return false; - return true; - } + if (ParameterDeclarationClauseAST *_other = pattern->asParameterDeclarationClause()) + return matcher->match(this, _other); + return false; } bool CallAST::match0(AST *pattern, ASTMatcher *matcher) { - if (CallAST *_other = pattern->asCall()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression_list, _other->expression_list, matcher)) - return false; - return true; - } + if (CallAST *_other = pattern->asCall()) + return matcher->match(this, _other); + return false; } bool ArrayAccessAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ArrayAccessAST *_other = pattern->asArrayAccess()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (ArrayAccessAST *_other = pattern->asArrayAccess()) + return matcher->match(this, _other); + return false; } bool PostIncrDecrAST::match0(AST *pattern, ASTMatcher *matcher) { - if (PostIncrDecrAST *_other = pattern->asPostIncrDecr()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (PostIncrDecrAST *_other = pattern->asPostIncrDecr()) + return matcher->match(this, _other); + return false; } bool MemberAccessAST::match0(AST *pattern, ASTMatcher *matcher) { - if (MemberAccessAST *_other = pattern->asMemberAccess()) { - if (! matcher->match(this, _other)) - return false; - if (! match(member_name, _other->member_name, matcher)) - return false; - return true; - } + if (MemberAccessAST *_other = pattern->asMemberAccess()) + return matcher->match(this, _other); + return false; } bool TypeidExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TypeidExpressionAST *_other = pattern->asTypeidExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (TypeidExpressionAST *_other = pattern->asTypeidExpression()) + return matcher->match(this, _other); + return false; } bool TypenameCallExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TypenameCallExpressionAST *_other = pattern->asTypenameCallExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - if (! match(expression_list, _other->expression_list, matcher)) - return false; - return true; - } + if (TypenameCallExpressionAST *_other = pattern->asTypenameCallExpression()) + return matcher->match(this, _other); + return false; } bool TypeConstructorCallAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TypeConstructorCallAST *_other = pattern->asTypeConstructorCall()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_specifier_list, _other->type_specifier_list, matcher)) - return false; - if (! match(expression_list, _other->expression_list, matcher)) - return false; - return true; - } + if (TypeConstructorCallAST *_other = pattern->asTypeConstructorCall()) + return matcher->match(this, _other); + return false; } bool PostfixExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (PostfixExpressionAST *_other = pattern->asPostfixExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(base_expression, _other->base_expression, matcher)) - return false; - if (! match(postfix_expression_list, _other->postfix_expression_list, matcher)) - return false; - return true; - } + if (PostfixExpressionAST *_other = pattern->asPostfixExpression()) + return matcher->match(this, _other); + return false; } bool PointerToMemberAST::match0(AST *pattern, ASTMatcher *matcher) { - if (PointerToMemberAST *_other = pattern->asPointerToMember()) { - if (! matcher->match(this, _other)) - return false; - if (! match(nested_name_specifier_list, _other->nested_name_specifier_list, matcher)) - return false; - if (! match(cv_qualifier_list, _other->cv_qualifier_list, matcher)) - return false; - return true; - } + if (PointerToMemberAST *_other = pattern->asPointerToMember()) + return matcher->match(this, _other); + return false; } bool PointerAST::match0(AST *pattern, ASTMatcher *matcher) { - if (PointerAST *_other = pattern->asPointer()) { - if (! matcher->match(this, _other)) - return false; - if (! match(cv_qualifier_list, _other->cv_qualifier_list, matcher)) - return false; - return true; - } + if (PointerAST *_other = pattern->asPointer()) + return matcher->match(this, _other); + return false; } bool ReferenceAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ReferenceAST *_other = pattern->asReference()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (ReferenceAST *_other = pattern->asReference()) + return matcher->match(this, _other); + return false; } bool BreakStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (BreakStatementAST *_other = pattern->asBreakStatement()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (BreakStatementAST *_other = pattern->asBreakStatement()) + return matcher->match(this, _other); + return false; } bool ContinueStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ContinueStatementAST *_other = pattern->asContinueStatement()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (ContinueStatementAST *_other = pattern->asContinueStatement()) + return matcher->match(this, _other); + return false; } bool GotoStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (GotoStatementAST *_other = pattern->asGotoStatement()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (GotoStatementAST *_other = pattern->asGotoStatement()) + return matcher->match(this, _other); + return false; } bool ReturnStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ReturnStatementAST *_other = pattern->asReturnStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (ReturnStatementAST *_other = pattern->asReturnStatement()) + return matcher->match(this, _other); + return false; } bool SizeofExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (SizeofExpressionAST *_other = pattern->asSizeofExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (SizeofExpressionAST *_other = pattern->asSizeofExpression()) + return matcher->match(this, _other); + return false; } bool NumericLiteralAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NumericLiteralAST *_other = pattern->asNumericLiteral()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (NumericLiteralAST *_other = pattern->asNumericLiteral()) + return matcher->match(this, _other); + return false; } bool BoolLiteralAST::match0(AST *pattern, ASTMatcher *matcher) { - if (BoolLiteralAST *_other = pattern->asBoolLiteral()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (BoolLiteralAST *_other = pattern->asBoolLiteral()) + return matcher->match(this, _other); + return false; } bool ThisExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ThisExpressionAST *_other = pattern->asThisExpression()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (ThisExpressionAST *_other = pattern->asThisExpression()) + return matcher->match(this, _other); + return false; } bool NestedExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (NestedExpressionAST *_other = pattern->asNestedExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (NestedExpressionAST *_other = pattern->asNestedExpression()) + return matcher->match(this, _other); + return false; } bool StringLiteralAST::match0(AST *pattern, ASTMatcher *matcher) { - if (StringLiteralAST *_other = pattern->asStringLiteral()) { - if (! matcher->match(this, _other)) - return false; - if (! match(next, _other->next, matcher)) - return false; - return true; - } + if (StringLiteralAST *_other = pattern->asStringLiteral()) + return matcher->match(this, _other); + return false; } bool SwitchStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (SwitchStatementAST *_other = pattern->asSwitchStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(condition, _other->condition, matcher)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - return true; - } + if (SwitchStatementAST *_other = pattern->asSwitchStatement()) + return matcher->match(this, _other); + return false; } bool TemplateDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TemplateDeclarationAST *_other = pattern->asTemplateDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(template_parameter_list, _other->template_parameter_list, matcher)) - return false; - if (! match(declaration, _other->declaration, matcher)) - return false; - return true; - } + if (TemplateDeclarationAST *_other = pattern->asTemplateDeclaration()) + return matcher->match(this, _other); + return false; } bool ThrowExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ThrowExpressionAST *_other = pattern->asThrowExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (ThrowExpressionAST *_other = pattern->asThrowExpression()) + return matcher->match(this, _other); + return false; } bool TranslationUnitAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TranslationUnitAST *_other = pattern->asTranslationUnit()) { - if (! matcher->match(this, _other)) - return false; - if (! match(declaration_list, _other->declaration_list, matcher)) - return false; - return true; - } + if (TranslationUnitAST *_other = pattern->asTranslationUnit()) + return matcher->match(this, _other); + return false; } bool TryBlockStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TryBlockStatementAST *_other = pattern->asTryBlockStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - if (! match(catch_clause_list, _other->catch_clause_list, matcher)) - return false; - return true; - } + if (TryBlockStatementAST *_other = pattern->asTryBlockStatement()) + return matcher->match(this, _other); + return false; } bool CatchClauseAST::match0(AST *pattern, ASTMatcher *matcher) { - if (CatchClauseAST *_other = pattern->asCatchClause()) { - if (! matcher->match(this, _other)) - return false; - if (! match(exception_declaration, _other->exception_declaration, matcher)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - return true; - } + if (CatchClauseAST *_other = pattern->asCatchClause()) + return matcher->match(this, _other); + return false; } bool TypeIdAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TypeIdAST *_other = pattern->asTypeId()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_specifier_list, _other->type_specifier_list, matcher)) - return false; - if (! match(declarator, _other->declarator, matcher)) - return false; - return true; - } + if (TypeIdAST *_other = pattern->asTypeId()) + return matcher->match(this, _other); + return false; } bool TypenameTypeParameterAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TypenameTypeParameterAST *_other = pattern->asTypenameTypeParameter()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - if (! match(type_id, _other->type_id, matcher)) - return false; - return true; - } + if (TypenameTypeParameterAST *_other = pattern->asTypenameTypeParameter()) + return matcher->match(this, _other); + return false; } bool TemplateTypeParameterAST::match0(AST *pattern, ASTMatcher *matcher) { - if (TemplateTypeParameterAST *_other = pattern->asTemplateTypeParameter()) { - if (! matcher->match(this, _other)) - return false; - if (! match(template_parameter_list, _other->template_parameter_list, matcher)) - return false; - if (! match(name, _other->name, matcher)) - return false; - if (! match(type_id, _other->type_id, matcher)) - return false; - return true; - } + if (TemplateTypeParameterAST *_other = pattern->asTemplateTypeParameter()) + return matcher->match(this, _other); + return false; } bool UnaryExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (UnaryExpressionAST *_other = pattern->asUnaryExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(expression, _other->expression, matcher)) - return false; - return true; - } + if (UnaryExpressionAST *_other = pattern->asUnaryExpression()) + return matcher->match(this, _other); + return false; } bool UsingAST::match0(AST *pattern, ASTMatcher *matcher) { - if (UsingAST *_other = pattern->asUsing()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - return true; - } + if (UsingAST *_other = pattern->asUsing()) + return matcher->match(this, _other); + return false; } bool UsingDirectiveAST::match0(AST *pattern, ASTMatcher *matcher) { - if (UsingDirectiveAST *_other = pattern->asUsingDirective()) { - if (! matcher->match(this, _other)) - return false; - if (! match(name, _other->name, matcher)) - return false; - return true; - } + if (UsingDirectiveAST *_other = pattern->asUsingDirective()) + return matcher->match(this, _other); + return false; } bool WhileStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (WhileStatementAST *_other = pattern->asWhileStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(condition, _other->condition, matcher)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - return true; - } + if (WhileStatementAST *_other = pattern->asWhileStatement()) + return matcher->match(this, _other); + return false; } bool ObjCClassForwardDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCClassForwardDeclarationAST *_other = pattern->asObjCClassForwardDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - if (! match(identifier_list, _other->identifier_list, matcher)) - return false; - return true; - } + if (ObjCClassForwardDeclarationAST *_other = pattern->asObjCClassForwardDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCClassDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCClassDeclarationAST *_other = pattern->asObjCClassDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - if (! match(class_name, _other->class_name, matcher)) - return false; - if (! match(category_name, _other->category_name, matcher)) - return false; - if (! match(superclass, _other->superclass, matcher)) - return false; - if (! match(protocol_refs, _other->protocol_refs, matcher)) - return false; - if (! match(inst_vars_decl, _other->inst_vars_decl, matcher)) - return false; - if (! match(member_declaration_list, _other->member_declaration_list, matcher)) - return false; - return true; - } + if (ObjCClassDeclarationAST *_other = pattern->asObjCClassDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCProtocolForwardDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCProtocolForwardDeclarationAST *_other = pattern->asObjCProtocolForwardDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - if (! match(identifier_list, _other->identifier_list, matcher)) - return false; - return true; - } + if (ObjCProtocolForwardDeclarationAST *_other = pattern->asObjCProtocolForwardDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCProtocolDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCProtocolDeclarationAST *_other = pattern->asObjCProtocolDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - if (! match(name, _other->name, matcher)) - return false; - if (! match(protocol_refs, _other->protocol_refs, matcher)) - return false; - if (! match(member_declaration_list, _other->member_declaration_list, matcher)) - return false; - return true; - } + if (ObjCProtocolDeclarationAST *_other = pattern->asObjCProtocolDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCProtocolRefsAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCProtocolRefsAST *_other = pattern->asObjCProtocolRefs()) { - if (! matcher->match(this, _other)) - return false; - if (! match(identifier_list, _other->identifier_list, matcher)) - return false; - return true; - } + if (ObjCProtocolRefsAST *_other = pattern->asObjCProtocolRefs()) + return matcher->match(this, _other); + return false; } bool ObjCMessageArgumentAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCMessageArgumentAST *_other = pattern->asObjCMessageArgument()) { - if (! matcher->match(this, _other)) - return false; - if (! match(parameter_value_expression, _other->parameter_value_expression, matcher)) - return false; - return true; - } + if (ObjCMessageArgumentAST *_other = pattern->asObjCMessageArgument()) + return matcher->match(this, _other); + return false; } bool ObjCMessageExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCMessageExpressionAST *_other = pattern->asObjCMessageExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(receiver_expression, _other->receiver_expression, matcher)) - return false; - if (! match(selector, _other->selector, matcher)) - return false; - if (! match(argument_list, _other->argument_list, matcher)) - return false; - return true; - } + if (ObjCMessageExpressionAST *_other = pattern->asObjCMessageExpression()) + return matcher->match(this, _other); + return false; } bool ObjCProtocolExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCProtocolExpressionAST *_other = pattern->asObjCProtocolExpression()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (ObjCProtocolExpressionAST *_other = pattern->asObjCProtocolExpression()) + return matcher->match(this, _other); + return false; } bool ObjCTypeNameAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCTypeNameAST *_other = pattern->asObjCTypeName()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_id, _other->type_id, matcher)) - return false; - return true; - } + if (ObjCTypeNameAST *_other = pattern->asObjCTypeName()) + return matcher->match(this, _other); + return false; } bool ObjCEncodeExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCEncodeExpressionAST *_other = pattern->asObjCEncodeExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_name, _other->type_name, matcher)) - return false; - return true; - } + if (ObjCEncodeExpressionAST *_other = pattern->asObjCEncodeExpression()) + return matcher->match(this, _other); + return false; } bool ObjCSelectorWithoutArgumentsAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCSelectorWithoutArgumentsAST *_other = pattern->asObjCSelectorWithoutArguments()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (ObjCSelectorWithoutArgumentsAST *_other = pattern->asObjCSelectorWithoutArguments()) + return matcher->match(this, _other); + return false; } bool ObjCSelectorArgumentAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCSelectorArgumentAST *_other = pattern->asObjCSelectorArgument()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (ObjCSelectorArgumentAST *_other = pattern->asObjCSelectorArgument()) + return matcher->match(this, _other); + return false; } bool ObjCSelectorWithArgumentsAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCSelectorWithArgumentsAST *_other = pattern->asObjCSelectorWithArguments()) { - if (! matcher->match(this, _other)) - return false; - if (! match(selector_argument_list, _other->selector_argument_list, matcher)) - return false; - return true; - } + if (ObjCSelectorWithArgumentsAST *_other = pattern->asObjCSelectorWithArguments()) + return matcher->match(this, _other); + return false; } bool ObjCSelectorExpressionAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCSelectorExpressionAST *_other = pattern->asObjCSelectorExpression()) { - if (! matcher->match(this, _other)) - return false; - if (! match(selector, _other->selector, matcher)) - return false; - return true; - } + if (ObjCSelectorExpressionAST *_other = pattern->asObjCSelectorExpression()) + return matcher->match(this, _other); + return false; } bool ObjCInstanceVariablesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCInstanceVariablesDeclarationAST *_other = pattern->asObjCInstanceVariablesDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(instance_variable_list, _other->instance_variable_list, matcher)) - return false; - return true; - } + if (ObjCInstanceVariablesDeclarationAST *_other = pattern->asObjCInstanceVariablesDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCVisibilityDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCVisibilityDeclarationAST *_other = pattern->asObjCVisibilityDeclaration()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (ObjCVisibilityDeclarationAST *_other = pattern->asObjCVisibilityDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCPropertyAttributeAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCPropertyAttributeAST *_other = pattern->asObjCPropertyAttribute()) { - if (! matcher->match(this, _other)) - return false; - if (! match(method_selector, _other->method_selector, matcher)) - return false; - return true; - } + if (ObjCPropertyAttributeAST *_other = pattern->asObjCPropertyAttribute()) + return matcher->match(this, _other); + return false; } bool ObjCPropertyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCPropertyDeclarationAST *_other = pattern->asObjCPropertyDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - if (! match(property_attribute_list, _other->property_attribute_list, matcher)) - return false; - if (! match(simple_declaration, _other->simple_declaration, matcher)) - return false; - return true; - } + if (ObjCPropertyDeclarationAST *_other = pattern->asObjCPropertyDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCMessageArgumentDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCMessageArgumentDeclarationAST *_other = pattern->asObjCMessageArgumentDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_name, _other->type_name, matcher)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - return true; - } + if (ObjCMessageArgumentDeclarationAST *_other = pattern->asObjCMessageArgumentDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCMethodPrototypeAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCMethodPrototypeAST *_other = pattern->asObjCMethodPrototype()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_name, _other->type_name, matcher)) - return false; - if (! match(selector, _other->selector, matcher)) - return false; - if (! match(argument_list, _other->argument_list, matcher)) - return false; - if (! match(attribute_list, _other->attribute_list, matcher)) - return false; - return true; - } + if (ObjCMethodPrototypeAST *_other = pattern->asObjCMethodPrototype()) + return matcher->match(this, _other); + return false; } bool ObjCMethodDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCMethodDeclarationAST *_other = pattern->asObjCMethodDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(method_prototype, _other->method_prototype, matcher)) - return false; - if (! match(function_body, _other->function_body, matcher)) - return false; - return true; - } + if (ObjCMethodDeclarationAST *_other = pattern->asObjCMethodDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCSynthesizedPropertyAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCSynthesizedPropertyAST *_other = pattern->asObjCSynthesizedProperty()) { - if (! matcher->match(this, _other)) - return false; - return true; - } + if (ObjCSynthesizedPropertyAST *_other = pattern->asObjCSynthesizedProperty()) + return matcher->match(this, _other); + return false; } bool ObjCSynthesizedPropertiesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCSynthesizedPropertiesDeclarationAST *_other = pattern->asObjCSynthesizedPropertiesDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(property_identifier_list, _other->property_identifier_list, matcher)) - return false; - return true; - } + if (ObjCSynthesizedPropertiesDeclarationAST *_other = pattern->asObjCSynthesizedPropertiesDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCDynamicPropertiesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCDynamicPropertiesDeclarationAST *_other = pattern->asObjCDynamicPropertiesDeclaration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(property_identifier_list, _other->property_identifier_list, matcher)) - return false; - return true; - } + if (ObjCDynamicPropertiesDeclarationAST *_other = pattern->asObjCDynamicPropertiesDeclaration()) + return matcher->match(this, _other); + return false; } bool ObjCFastEnumerationAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCFastEnumerationAST *_other = pattern->asObjCFastEnumeration()) { - if (! matcher->match(this, _other)) - return false; - if (! match(type_specifier_list, _other->type_specifier_list, matcher)) - return false; - if (! match(declarator, _other->declarator, matcher)) - return false; - if (! match(initializer, _other->initializer, matcher)) - return false; - if (! match(fast_enumeratable_expression, _other->fast_enumeratable_expression, matcher)) - return false; - if (! match(body_statement, _other->body_statement, matcher)) - return false; - return true; - } + if (ObjCFastEnumerationAST *_other = pattern->asObjCFastEnumeration()) + return matcher->match(this, _other); + return false; } bool ObjCSynchronizedStatementAST::match0(AST *pattern, ASTMatcher *matcher) { - if (ObjCSynchronizedStatementAST *_other = pattern->asObjCSynchronizedStatement()) { - if (! matcher->match(this, _other)) - return false; - if (! match(synchronized_object, _other->synchronized_object, matcher)) - return false; - if (! match(statement, _other->statement, matcher)) - return false; - return true; - } + if (ObjCSynchronizedStatementAST *_other = pattern->asObjCSynchronizedStatement()) + return matcher->match(this, _other); + return false; } |