Changeset cc32d83 for src/SynTree
- Timestamp:
 - May 3, 2018, 4:10:05 PM (8 years ago)
 - Branches:
 - ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
 - Children:
 - b97ebf1
 - Parents:
 - 637dd9c
 - Location:
 - src/SynTree
 - Files:
 - 
      
- 5 edited
 
- 
          
  Mutator.h (modified) (1 diff)
 - 
          
  Statement.cc (modified) (1 diff)
 - 
          
  Statement.h (modified) (1 diff)
 - 
          
  SynTree.h (modified) (1 diff)
 - 
          
  Visitor.h (modified) (1 diff)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
src/SynTree/Mutator.h
r637dd9c rcc32d83 39 39 virtual Statement * mutate( ExprStmt * exprStmt ) = 0; 40 40 virtual Statement * mutate( AsmStmt * asmStmt ) = 0; 41 virtual Statement * mutate( DirectiveStmt * dirStmt ) = 0; 41 42 virtual Statement * mutate( IfStmt * ifStmt ) = 0; 42 43 virtual Statement * mutate( WhileStmt * whileStmt ) = 0;  - 
      
src/SynTree/Statement.cc
r637dd9c rcc32d83 94 94 95 95 96 DirectiveStmt::DirectiveStmt( const std::string & directive ) : Statement(), directive( directive ) {} 97 98 void DirectiveStmt::print( std::ostream &os, Indenter ) const { 99 os << "GCC Directive:" << directive << endl; 100 } 101 102 96 103 const char *BranchStmt::brType[] = { "Goto", "Break", "Continue" }; 97 104  - 
      
src/SynTree/Statement.h
r637dd9c rcc32d83 126 126 }; 127 127 128 class DirectiveStmt : public Statement { 129 public: 130 std::string directive; 131 132 DirectiveStmt( const std::string & ); 133 virtual ~DirectiveStmt(){} 134 135 virtual DirectiveStmt * clone() const { return new DirectiveStmt( *this ); } 136 virtual void accept( Visitor & v ) { v.visit( this ); } 137 virtual Statement * acceptMutator( Mutator & m ) { return m.mutate( this ); } 138 virtual void print( std::ostream & os, Indenter indent = {} ) const; 139 }; 140 128 141 class IfStmt : public Statement { 129 142 public:  - 
      
src/SynTree/SynTree.h
r637dd9c rcc32d83 44 44 class ExprStmt; 45 45 class AsmStmt; 46 class DirectiveStmt; 46 47 class IfStmt; 47 48 class WhileStmt;  - 
      
src/SynTree/Visitor.h
r637dd9c rcc32d83 41 41 virtual void visit( ExprStmt * exprStmt ) = 0; 42 42 virtual void visit( AsmStmt * asmStmt ) = 0; 43 virtual void visit( DirectiveStmt * directiveStmt ) = 0; 43 44 virtual void visit( IfStmt * ifStmt ) = 0; 44 45 virtual void visit( WhileStmt * whileStmt ) = 0;  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.