Changeset 3a5131ed for src/SynTree
- Timestamp:
- Feb 16, 2017, 3:36:45 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, resolv-new, with_gc
- Children:
- 317450e
- Parents:
- c3d9adc
- Location:
- src/SynTree
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
rc3d9adc r3a5131ed 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 9 14:27:08201713 // Update Count : 5 612 // Last Modified On : Thu Feb 16 14:53:35 2017 13 // Update Count : 57 14 14 // 15 15 … … 140 140 CompoundStmt *get_statements() const { return statements; } 141 141 void set_statements( CompoundStmt *newValue ) { statements = newValue; } 142 std::list< std::string >& get_oldIdents() { return oldIdents; }143 std::list< Declaration* >& get_oldDecls() { return oldDecls; }144 142 145 143 virtual FunctionDecl *clone() const { return new FunctionDecl( *this ); } … … 151 149 FunctionType *type; 152 150 CompoundStmt *statements; 153 std::list< std::string > oldIdents;154 std::list< Declaration* > oldDecls;155 151 }; 156 152 -
src/SynTree/FunctionDecl.cc
rc3d9adc r3a5131ed 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Oct 1 23:06:32 201613 // Update Count : 2 112 // Last Modified On : Thu Feb 16 15:01:52 2017 13 // Update Count : 23 14 14 // 15 15 … … 44 44 delete type; 45 45 delete statements; 46 deleteAll( oldDecls );47 46 } 48 47 … … 84 83 } // if 85 84 86 if ( ! oldIdents.empty() ) {87 os << string( indent + 2, ' ' ) << "with parameter names" << endl;88 for ( std::list< std::string >::const_iterator i = oldIdents.begin(); i != oldIdents.end(); ++i ) {89 os << string( indent + 4, ' ' ) << *i << endl;90 } // for91 } // if92 93 if ( ! oldDecls.empty() ) {94 os << string( indent + 2, ' ' ) << "with parameter declarations" << endl;95 printAll( oldDecls, os, indent + 4 );96 } // if97 85 if ( statements ) { 98 86 os << string( indent + 2, ' ' ) << "with body " << endl; -
src/SynTree/Mutator.cc
rc3d9adc r3a5131ed 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 9 14:22:56201713 // Update Count : 2 012 // Last Modified On : Thu Feb 16 15:02:23 2017 13 // Update Count : 21 14 14 // 15 15 … … 38 38 DeclarationWithType *Mutator::mutate( FunctionDecl *functionDecl ) { 39 39 functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) ); 40 mutateAll( functionDecl->get_oldDecls(), *this );41 40 functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) ); 42 41 return functionDecl; -
src/SynTree/Visitor.cc
rc3d9adc r3a5131ed 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 9 14:19:22201713 // Update Count : 2 212 // Last Modified On : Thu Feb 16 15:01:25 2017 13 // Update Count : 23 14 14 // 15 15 … … 35 35 void Visitor::visit( FunctionDecl *functionDecl ) { 36 36 maybeAccept( functionDecl->get_functionType(), *this ); 37 acceptAll( functionDecl->get_oldDecls(), *this );38 37 maybeAccept( functionDecl->get_statements(), *this ); 39 38 }
Note: See TracChangeset
for help on using the changeset viewer.