source: src/SynTree/AddStmtVisitor.h@ 3f869f0

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors ctor deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox memory new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since 3f869f0 was 51fcaf8d, checked in by Rob Schluntz <rschlunt@…>, 9 years ago

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

  • Property mode set to 100644
File size: 1.2 KB
Line 
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.