Ignore:
Timestamp:
Sep 13, 2017, 3:11:24 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
c57ded70, db70fe4
Parents:
d130fe8 (diff), 982832e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Visitor.h

    rd130fe8 rba54f7d  
    148148}
    149149
    150 template< typename Container, typename VisitorType >
    151 void acceptAllFold( Container &container, VisitorType &visitor, VisitorType &around ) {
    152         SemanticError errors;
    153         for ( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
    154                 try {
    155                         if ( *i ) {
    156                                 VisitorType *v = new VisitorType;
    157                                 (*i)->accept( *v );
    158 
    159                                 typename Container::iterator nxt = i; nxt++; // forward_iterator
    160                                 if ( nxt == container.end() )
    161                                         visitor += *v;
    162                                 else
    163                                         visitor += *v + around;
    164 
    165                                 delete v;
    166                         } // if
    167                 } catch( SemanticError &e ) {
    168                         e.set_location( (*i)->location );
    169                         errors.append( e );
    170                 } // try
    171         } // for
    172         if ( ! errors.isEmpty() ) {
    173                 throw errors;
    174         } // if
    175 }
    176 
    177150// Local Variables: //
    178151// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.