Changes in src/SynTree/ApplicationExpr.cc [d29fa5f:e3e16bc]
- File:
-
- 1 edited
-
src/SynTree/ApplicationExpr.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/ApplicationExpr.cc
rd29fa5f re3e16bc 55 55 set_result( ResolvExpr::extractResultType( function ) ); 56 56 57 assert( result);57 assert( has_result() ); 58 58 } 59 59 … … 68 68 } 69 69 70 void printInferParams( const InferredParams & inferParams, std::ostream &os, Indenterindent, int level ) {70 void printInferParams( const InferredParams & inferParams, std::ostream &os, int indent, int level ) { 71 71 if ( ! inferParams.empty() ) { 72 os << indent<< "with inferred parameters " << level << ":" << std::endl;72 os << std::string(indent, ' ') << "with inferred parameters " << level << ":" << std::endl; 73 73 for ( InferredParams::const_iterator i = inferParams.begin(); i != inferParams.end(); ++i ) { 74 os << indent+1;75 Declaration::declFromId( i->second.decl )->printShort( os, indent+ 1);74 os << std::string(indent+2, ' '); 75 Declaration::declFromId( i->second.decl )->printShort( os, indent+2 ); 76 76 os << std::endl; 77 printInferParams( *i->second.inferParams, os, indent+ 1, level+1 );77 printInferParams( *i->second.inferParams, os, indent+2, level+1 ); 78 78 } // for 79 79 } // if 80 80 } 81 81 82 void ApplicationExpr::print( std::ostream &os, Indenter indent ) const { 83 os << "Application of" << std::endl << indent+1; 84 function->print( os, indent+1 ); 85 os << std::endl; 82 void ApplicationExpr::print( std::ostream &os, int indent ) const { 83 os << "Application of" << std::endl << std::string(indent+2, ' '); 84 function->print( os, indent+2 ); 86 85 if ( ! args.empty() ) { 87 os << indent << "...to arguments" << std::endl;88 printAll( args, os, indent+ 1);86 os << std::string( indent, ' ' ) << "to arguments" << std::endl; 87 printAll( args, os, indent+2 ); 89 88 } // if 90 printInferParams( inferParams, os, indent+ 1, 0 );89 printInferParams( inferParams, os, indent+2, 0 ); 91 90 Expression::print( os, indent ); 92 91 }
Note:
See TracChangeset
for help on using the changeset viewer.