Changeset 3f7e12cb for src/SynTree/ApplicationExpr.cc
- Timestamp:
- Nov 8, 2017, 5:43:33 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 954908d
- Parents:
- 78315272 (diff), e35f30a (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/ApplicationExpr.cc
r78315272 r3f7e12cb 55 55 set_result( ResolvExpr::extractResultType( function ) ); 56 56 57 assert( has_result());57 assert( result ); 58 58 } 59 59 60 60 ApplicationExpr::ApplicationExpr( const ApplicationExpr &other ) : 61 Expression( other ), function( maybeClone( other.function ) ) , inferParams( other.inferParams ){61 Expression( other ), function( maybeClone( other.function ) ) { 62 62 cloneAll( other.args, args ); 63 63 } … … 68 68 } 69 69 70 void printInferParams( const InferredParams & inferParams, std::ostream &os, int indent, int level ) { 71 if ( ! inferParams.empty() ) { 72 os << std::string(indent, ' ') << "with inferred parameters " << level << ":" << std::endl; 73 for ( InferredParams::const_iterator i = inferParams.begin(); i != inferParams.end(); ++i ) { 74 os << std::string(indent+2, ' '); 75 Declaration::declFromId( i->second.decl )->printShort( os, indent+2 ); 76 os << std::endl; 77 printInferParams( *i->second.inferParams, os, indent+2, level+1 ); 78 } // for 70 void ApplicationExpr::print( std::ostream &os, Indenter indent ) const { 71 os << "Application of" << std::endl << indent+1; 72 function->print( os, indent+1 ); 73 os << std::endl; 74 if ( ! args.empty() ) { 75 os << indent << "... to arguments" << std::endl; 76 printAll( args, os, indent+1 ); 79 77 } // if 80 }81 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 );85 if ( ! args.empty() ) {86 os << std::string( indent, ' ' ) << "to arguments" << std::endl;87 printAll( args, os, indent+2 );88 } // if89 printInferParams( inferParams, os, indent+2, 0 );90 78 Expression::print( os, indent ); 91 79 }
Note:
See TracChangeset
for help on using the changeset viewer.