Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Visitor.h

    r135b431 raa72198  
    9595        virtual void visit( PointerType *pointerType );
    9696        virtual void visit( ArrayType *arrayType );
     97        virtual void visit( ReferenceType *refType );
    9798        virtual void visit( FunctionType *functionType );
    9899        virtual void visit( StructInstType *aggregateUseType );
     
    147148}
    148149
    149 template< typename Container, typename VisitorType >
    150 void acceptAllFold( Container &container, VisitorType &visitor, VisitorType &around ) {
    151         SemanticError errors;
    152         for ( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
    153                 try {
    154                         if ( *i ) {
    155                                 VisitorType *v = new VisitorType;
    156                                 (*i)->accept( *v );
    157 
    158                                 typename Container::iterator nxt = i; nxt++; // forward_iterator
    159                                 if ( nxt == container.end() )
    160                                         visitor += *v;
    161                                 else
    162                                         visitor += *v + around;
    163 
    164                                 delete v;
    165                         } // if
    166                 } catch( SemanticError &e ) {
    167                         e.set_location( (*i)->location );
    168                         errors.append( e );
    169                 } // try
    170         } // for
    171         if ( ! errors.isEmpty() ) {
    172                 throw errors;
    173         } // if
    174 }
    175 
    176150// Local Variables: //
    177151// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.