00001 //===-- ast/StmtVisitor.h ------------------------------------- -*- C++ -*-===// 00002 // 00003 // This file is distributed under the MIT license. See LICENSE.txt for details. 00004 // 00005 // Copyright (C) 2009-2010, Stephen Wilson 00006 // 00007 //===----------------------------------------------------------------------===// 00008 00009 //===----------------------------------------------------------------------===// 00015 //===----------------------------------------------------------------------===// 00016 00017 #ifndef COMMA_AST_STMTVISITOR_HDR_GUARD 00018 #define COMMA_AST_SRMTVISITOR_HDR_GUARD 00019 00020 #include "comma/ast/AstBase.h" 00021 00022 namespace comma { 00023 00024 class StmtVisitor { 00025 00026 public: 00027 virtual ~StmtVisitor() { } 00028 00040 virtual void visitAst(Ast *node); 00041 virtual void visitStmt(Stmt *node); 00042 virtual void visitStmtSequence(StmtSequence *node); 00044 00051 virtual void visitBlockStmt(BlockStmt *node); 00052 virtual void visitProcedureCallStmt(ProcedureCallStmt *node); 00053 virtual void visitReturnStmt(ReturnStmt *node); 00054 virtual void visitAssignmentStmt(AssignmentStmt *node); 00055 virtual void visitIfStmt(IfStmt *node); 00056 virtual void visitWhileStmt(WhileStmt *node); 00057 virtual void visitForStmt(ForStmt *node); 00058 virtual void visitLoopStmt(LoopStmt *node); 00059 virtual void visitRaiseStmt(RaiseStmt *node); 00060 virtual void visitPragmaStmt(PragmaStmt *node); 00061 virtual void visitNullStmt(NullStmt *node); 00063 }; 00064 00065 } // end comma namespace. 00066 00067 #endif 00068