source: src/SynTree/AddStmtVisitor.h @ 84d4d6f

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 84d4d6f was 51fcaf8d, checked in by Rob Schluntz <rschlunt@…>, 8 years ago

introduce AddStmtVisitor? which provides statement insertion in the same manner as PolyMutator?

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[51fcaf8d]1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// AddStmtVisitor.h --
8//
9// Author           : Rob Schluntz
10// Created On       : Wed Jun 22 12:05:48 2016
11// Last Modified By : Rob Schluntz
12// Last Modified On : Wed Jun 22 12:12:05 2016
13// Update Count     : 7
14//
15
16#ifndef ADD_STATEMENT_VISITOR_H
17#define ADD_STATEMENT_VISITOR_H
18
19#include <list>
20
21#include "SynTree/SynTree.h"
22#include "SynTree/Visitor.h"
23
24class AddStmtVisitor : public Visitor {
25  public:
26        typedef Visitor Parent;
27
28        using Parent::visit;
29        virtual void visit(CompoundStmt *compoundStmt);
30        virtual void visit(IfStmt *ifStmt);
31        virtual void visit(WhileStmt *whileStmt);
32        virtual void visit(ForStmt *forStmt);
33        virtual void visit(SwitchStmt *switchStmt);
34        virtual void visit(ChooseStmt *chooseStmt);
35        virtual void visit(CaseStmt *caseStmt);
36        virtual void visit(CatchStmt *catchStmt);
37
38  protected:
39        void visitStatementList( std::list< Statement * > & );
40        Statement * visitStatement( Statement * );
41        std::list< Statement* > stmtsToAdd;
42        std::list< Statement* > stmtsToAddAfter;
43};
44
45#endif // ADD_STATEMENT_VISITOR_H
Note: See TracBrowser for help on using the repository browser.