Changes in src/SymTab/AddVisit.h [145f1fc:620cb95]
- File:
-
- 1 edited
-
src/SymTab/AddVisit.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/AddVisit.h
r145f1fc r620cb95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // AddVisit.h -- 7 // AddVisit.h -- 8 8 // 9 9 // Author : Richard C. Bilson … … 85 85 maybeAccept( cathStmt->get_decl(), visitor ); 86 86 } 87 88 template< typename Visitor > 89 void acceptAndAdd( std::list< Declaration * > &translationUnit, Visitor &visitor, bool addBefore ) { 90 std::list< Declaration * >::iterator i = translationUnit.begin(); 91 while ( i != translationUnit.end() ) { 92 (*i)->accept( visitor ); 93 std::list< Declaration * >::iterator next = i; 94 next++; 95 if ( ! visitor.get_declsToAdd().empty() ) { 96 translationUnit.splice( addBefore ? i : next, visitor.get_declsToAdd() ); 97 } // if 98 i = next; 99 } // while 100 } 87 101 } // namespace SymTab 88 102
Note:
See TracChangeset
for help on using the changeset viewer.