// // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // AddStmtVisitor.h -- // // Author : Rob Schluntz // Created On : Wed Jun 22 12:05:48 2016 // Last Modified By : Peter A. Buhr // Last Modified On : Sat Jul 22 09:51:08 2017 // Update Count : 9 // #pragma once #include // for list #include "SynTree/SynTree.h" // for Visitor Nodes #include "SynTree/Visitor.h" // for Visitor class AddStmtVisitor : public Visitor { public: typedef Visitor Parent; using Parent::visit; virtual void visit(CompoundStmt *compoundStmt); virtual void visit(IfStmt *ifStmt); virtual void visit(WhileStmt *whileStmt); virtual void visit(ForStmt *forStmt); virtual void visit(SwitchStmt *switchStmt); virtual void visit(CaseStmt *caseStmt); virtual void visit(CatchStmt *catchStmt); protected: void visitStatementList( std::list< Statement * > & ); Statement * visitStatement( Statement * ); std::list< Statement* > stmtsToAdd; std::list< Statement* > stmtsToAddAfter; }; // Local Variables: // // tab-width: 4 // // mode: c++ // // compile-command: "make install" // // End: //