/* Copyright 2008 Hamish Rodda This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "changevisitor.h" ChangeVisitor::visitor_fun_ptr ChangeVisitor::_S_table[AST::NODE_KIND_COUNT] = { 0, reinterpret_cast(&ChangeVisitor::visitAccessSpecifier), reinterpret_cast(&ChangeVisitor::visitAsmDefinition), reinterpret_cast(&ChangeVisitor::visitBaseClause), reinterpret_cast(&ChangeVisitor::visitBaseSpecifier), reinterpret_cast(&ChangeVisitor::visitBinaryExpression), reinterpret_cast(&ChangeVisitor::visitCastExpression), reinterpret_cast(&ChangeVisitor::visitClassMemberAccess), reinterpret_cast(&ChangeVisitor::visitClassSpecifier), reinterpret_cast(&ChangeVisitor::visitCompoundStatement), reinterpret_cast(&ChangeVisitor::visitCondition), reinterpret_cast(&ChangeVisitor::visitConditionalExpression), reinterpret_cast(&ChangeVisitor::visitCppCastExpression), reinterpret_cast(&ChangeVisitor::visitCtorInitializer), reinterpret_cast(&ChangeVisitor::visitDeclarationStatement), reinterpret_cast(&ChangeVisitor::visitDeclarator), reinterpret_cast(&ChangeVisitor::visitDeleteExpression), reinterpret_cast(&ChangeVisitor::visitDoStatement), reinterpret_cast(&ChangeVisitor::visitElaboratedTypeSpecifier), reinterpret_cast(&ChangeVisitor::visitEnumSpecifier), reinterpret_cast(&ChangeVisitor::visitEnumerator), reinterpret_cast(&ChangeVisitor::visitExceptionSpecification), reinterpret_cast(&ChangeVisitor::visitExpressionOrDeclarationStatement), reinterpret_cast(&ChangeVisitor::visitExpressionStatement), reinterpret_cast(&ChangeVisitor::visitForStatement), reinterpret_cast(&ChangeVisitor::visitFunctionCall), reinterpret_cast(&ChangeVisitor::visitFunctionDefinition), reinterpret_cast(&ChangeVisitor::visitIfStatement), reinterpret_cast(&ChangeVisitor::visitIncrDecrExpression), reinterpret_cast(&ChangeVisitor::visitInitDeclarator), reinterpret_cast(&ChangeVisitor::visitInitializer), reinterpret_cast(&ChangeVisitor::visitInitializerClause), reinterpret_cast(&ChangeVisitor::visitLabeledStatement), reinterpret_cast(&ChangeVisitor::visitLinkageBody), reinterpret_cast(&ChangeVisitor::visitLinkageSpecification), reinterpret_cast(&ChangeVisitor::visitMemInitializer), reinterpret_cast(&ChangeVisitor::visitName), reinterpret_cast(&ChangeVisitor::visitNamespace), reinterpret_cast(&ChangeVisitor::visitNamespaceAliasDefinition), reinterpret_cast(&ChangeVisitor::visitNewDeclarator), reinterpret_cast(&ChangeVisitor::visitNewExpression), reinterpret_cast(&ChangeVisitor::visitNewInitializer), reinterpret_cast(&ChangeVisitor::visitNewTypeId), reinterpret_cast(&ChangeVisitor::visitOperator), reinterpret_cast(&ChangeVisitor::visitOperatorFunctionId), reinterpret_cast(&ChangeVisitor::visitParameterDeclaration), reinterpret_cast(&ChangeVisitor::visitParameterDeclarationClause), reinterpret_cast(&ChangeVisitor::visitPostfixExpression), reinterpret_cast(&ChangeVisitor::visitPrimaryExpression), reinterpret_cast(&ChangeVisitor::visitPtrOperator), reinterpret_cast(&ChangeVisitor::visitPtrToMember), reinterpret_cast(&ChangeVisitor::visitReturnStatement), reinterpret_cast(&ChangeVisitor::visitSimpleDeclaration), reinterpret_cast(&ChangeVisitor::visitSimpleTypeSpecifier), reinterpret_cast(&ChangeVisitor::visitSizeofExpression), reinterpret_cast(&ChangeVisitor::visitStringLiteral), reinterpret_cast(&ChangeVisitor::visitSubscriptExpression), reinterpret_cast(&ChangeVisitor::visitSwitchStatement), reinterpret_cast(&ChangeVisitor::visitTemplateArgument), reinterpret_cast(&ChangeVisitor::visitTemplateDeclaration), reinterpret_cast(&ChangeVisitor::visitTemplateParameter), reinterpret_cast(&ChangeVisitor::visitThrowExpression), reinterpret_cast(&ChangeVisitor::visitTranslationUnit), reinterpret_cast(&ChangeVisitor::visitTryBlockStatement), reinterpret_cast(&ChangeVisitor::visitCatchStatement), reinterpret_cast(&ChangeVisitor::visitTypeId), reinterpret_cast(&ChangeVisitor::visitTypeIdentification), reinterpret_cast(&ChangeVisitor::visitTypeParameter), reinterpret_cast(&ChangeVisitor::visitTypedef), reinterpret_cast(&ChangeVisitor::visitUnaryExpression), reinterpret_cast(&ChangeVisitor::visitUnqualifiedName), reinterpret_cast(&ChangeVisitor::visitUsing), reinterpret_cast(&ChangeVisitor::visitUsingDirective), reinterpret_cast(&ChangeVisitor::visitWhileStatement), reinterpret_cast(&ChangeVisitor::visitWinDeclSpec), 0, reinterpret_cast(&ChangeVisitor::visitJumpStatement), reinterpret_cast(&ChangeVisitor::visitSignalSlotExpression) }; ChangeVisitor::ChangeVisitor() { } ChangeVisitor::~ChangeVisitor() { } void ChangeVisitor::visit(Change* change, AST *node) { if (node) (this->*_S_table[node->kind])(change, node); }