1 /* 2 * cASTVisitor.h 3 * Avida 4 * 5 * Created by David on 7/11/07. 6 * Copyright 2007-2011 Michigan State University. All rights reserved. 7 * 8 * 9 * This file is part of Avida. 10 * 11 * Avida is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License 12 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 13 * 14 * Avida is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public License along with Avida. 18 * If not, see <http://www.gnu.org/licenses/>. 19 * 20 */ 21 22 #ifndef cASTVisitor_h 23 #define cASTVisitor_h 24 25 #include "ASTree.h" 26 27 28 class cASTVisitor 29 { 30 public: cASTVisitor()31 cASTVisitor() { ; } ~cASTVisitor()32 virtual ~cASTVisitor() { ; } 33 34 35 virtual void VisitAssignment(cASTAssignment&) = 0; 36 virtual void VisitArgumentList(cASTArgumentList&) = 0; 37 virtual void VisitObjectAssignment(cASTObjectAssignment&) = 0; 38 39 virtual void VisitReturnStatement(cASTReturnStatement&) = 0; 40 virtual void VisitStatementList(cASTStatementList&) = 0; 41 42 virtual void VisitForeachBlock(cASTForeachBlock&) = 0; 43 virtual void VisitIfBlock(cASTIfBlock&) = 0; 44 virtual void VisitWhileBlock(cASTWhileBlock&) = 0; 45 46 virtual void VisitFunctionDefinition(cASTFunctionDefinition&) = 0; 47 virtual void VisitVariableDefinition(cASTVariableDefinition&) = 0; 48 virtual void VisitVariableDefinitionList(cASTVariableDefinitionList&) = 0; 49 50 virtual void VisitExpressionBinary(cASTExpressionBinary&) = 0; 51 virtual void VisitExpressionUnary(cASTExpressionUnary&) = 0; 52 53 virtual void VisitBuiltInCall(cASTBuiltInCall&) = 0; 54 virtual void VisitFunctionCall(cASTFunctionCall&) = 0; 55 virtual void VisitLiteral(cASTLiteral&) = 0; 56 virtual void VisitLiteralArray(cASTLiteralArray&) = 0; 57 virtual void VisitLiteralDict(cASTLiteralDict&) = 0; 58 virtual void VisitObjectCall(cASTObjectCall&) = 0; 59 virtual void VisitObjectReference(cASTObjectReference&) = 0; 60 virtual void VisitVariableReference(cASTVariableReference&) = 0; 61 virtual void VisitUnpackTarget(cASTUnpackTarget&) = 0; 62 }; 63 64 #endif 65