- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/TypeEnvironment.cc
r98a249fb ra585396 68 68 } 69 69 70 void EqvClass::print( std::ostream &os, Indenterindent ) const {71 os << "( ";70 void EqvClass::print( std::ostream &os, int indent ) const { 71 os << std::string( indent, ' ' ) << "( "; 72 72 std::copy( vars.begin(), vars.end(), std::ostream_iterator< std::string >( os, " " ) ); 73 73 os << ")"; 74 74 if ( type ) { 75 75 os << " -> "; 76 type->print( os, indent +1);76 type->print( os, indent ); 77 77 } // if 78 78 if ( ! allowWidening ) { … … 123 123 for ( std::list< EqvClass >::const_iterator theClass = env.begin(); theClass != env.end(); ++theClass ) { 124 124 for ( std::set< std::string >::const_iterator theVar = theClass->vars.begin(); theVar != theClass->vars.end(); ++theVar ) { 125 /// std::c err<< "adding " << *theVar;125 /// std::cout << "adding " << *theVar; 126 126 if ( theClass->type ) { 127 /// std::c err<< " bound to ";128 /// theClass->type->print( std::c err);129 /// std::c err<< std::endl;127 /// std::cout << " bound to "; 128 /// theClass->type->print( std::cout ); 129 /// std::cout << std::endl; 130 130 sub.add( *theVar, theClass->type ); 131 131 } else if ( theVar != theClass->vars.begin() ) { 132 132 TypeInstType *newTypeInst = new TypeInstType( Type::Qualifiers(), *theClass->vars.begin(), theClass->data.kind == TypeDecl::Ftype ); 133 /// std::c err<< " bound to variable " << *theClass->vars.begin() << std::endl;133 /// std::cout << " bound to variable " << *theClass->vars.begin() << std::endl; 134 134 sub.add( *theVar, newTypeInst ); 135 135 delete newTypeInst; … … 144 144 } 145 145 146 void TypeEnvironment::print( std::ostream &os, Indenterindent ) const {146 void TypeEnvironment::print( std::ostream &os, int indent ) const { 147 147 for ( std::list< EqvClass >::const_iterator i = env.begin(); i != env.end(); ++i ) { 148 148 i->print( os, indent ); … … 212 212 } 213 213 214 std::ostream & operator<<( std::ostream & out, const TypeEnvironment & env ) {215 env.print( out );216 return out;217 }218 214 } // namespace ResolvExpr 219 215
Note: See TracChangeset
for help on using the changeset viewer.