Changeset 2162c2c for src/SynTree/ApplicationExpr.cc
- Timestamp:
- Jan 11, 2017, 4:11:02 PM (9 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:
- 075734f
- Parents:
- bb82c03 (diff), d3a85240 (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
rbb82c03 r2162c2c 24 24 25 25 ParamEntry::ParamEntry( const ParamEntry &other ) : 26 decl( other.decl ), actualType( maybeClone( other.actualType ) ), formalType( maybeClone( other.formalType ) ), expr( maybeClone( other.expr ) ) {26 decl( other.decl ), actualType( maybeClone( other.actualType ) ), formalType( maybeClone( other.formalType ) ), expr( maybeClone( other.expr ) ), inferParams( new InferredParams( *other.inferParams ) ) { 27 27 } 28 28 … … 34 34 formalType = maybeClone( other.formalType ); 35 35 expr = maybeClone( other.expr ); 36 *inferParams = *other.inferParams; 36 37 return *this; 37 38 } … … 62 63 } 63 64 65 void printInferParams( const InferredParams & inferParams, std::ostream &os, int indent, int level ) { 66 if ( ! inferParams.empty() ) { 67 os << std::string(indent, ' ') << "with inferred parameters " << level << ":" << std::endl; 68 for ( InferredParams::const_iterator i = inferParams.begin(); i != inferParams.end(); ++i ) { 69 os << std::string(indent+2, ' '); 70 Declaration::declFromId( i->second.decl )->printShort( os, indent+2 ); 71 os << std::endl; 72 printInferParams( *i->second.inferParams, os, indent+2, level+1 ); 73 } // for 74 } // if 75 } 76 64 77 void ApplicationExpr::print( std::ostream &os, int indent ) const { 65 78 os << "Application of" << std::endl << std::string(indent+2, ' '); … … 69 82 printAll( args, os, indent+2 ); 70 83 } // if 71 if ( ! inferParams.empty() ) { 72 os << std::string(indent, ' ') << "with inferred parameters:" << 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 } // for 78 } // if 84 printInferParams( inferParams, os, indent+2, 0 ); 79 85 Expression::print( os, indent ); 80 86 }
Note:
See TracChangeset
for help on using the changeset viewer.