Changeset 68195a6 for src/SynTree
- Timestamp:
- Oct 25, 2017, 4:07:31 PM (7 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:
- bb666f64
- Parents:
- b45d4b2
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/ApplicationExpr.cc
rb45d4b2 r68195a6 68 68 } 69 69 70 void printInferParams( const InferredParams & inferParams, std::ostream &os, Indenter indent, int level ) {71 if ( ! inferParams.empty() ) {72 os << indent << "with inferred parameters " << level << ":" << std::endl;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 );76 os << std::endl;77 printInferParams( *i->second.inferParams, os, indent+1, level+1 );78 } // for79 } // if80 }81 82 70 void ApplicationExpr::print( std::ostream &os, Indenter indent ) const { 83 71 os << "Application of" << std::endl << indent+1; … … 88 76 printAll( args, os, indent+1 ); 89 77 } // if 90 printInferParams( inferParams, os, indent+1, 0 );91 78 Expression::print( os, indent ); 92 79 } -
src/SynTree/Expression.cc
rb45d4b2 r68195a6 33 33 #include "GenPoly/Lvalue.h" 34 34 35 void printInferParams( const InferredParams & inferParams, std::ostream &os, Indenter indent, int level ) { 36 if ( ! inferParams.empty() ) { 37 os << indent << "with inferred parameters " << level << ":" << std::endl; 38 for ( InferredParams::const_iterator i = inferParams.begin(); i != inferParams.end(); ++i ) { 39 os << indent+1; 40 Declaration::declFromId( i->second.decl )->printShort( os, indent+1 ); 41 os << std::endl; 42 printInferParams( *i->second.inferParams, os, indent+1, level+1 ); 43 } // for 44 } // if 45 } 46 35 47 Expression::Expression() : result( 0 ), env( 0 ) {} 36 48 … … 44 56 45 57 void Expression::print( std::ostream &os, Indenter indent ) const { 58 printInferParams( inferParams, os, indent+1, 0 ); 59 46 60 if ( env ) { 47 61 os << std::endl << indent << "... with environment:" << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.