Changeset 3f7e12cb for src/SynTree/AggregateDecl.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/AggregateDecl.cc
r78315272 r3f7e12cb 41 41 } 42 42 43 void AggregateDecl::print( std::ostream &os, intindent ) const {43 void AggregateDecl::print( std::ostream &os, Indenter indent ) const { 44 44 using std::string; 45 45 using std::endl; 46 46 47 os << typeString() << " " << get_name()<< ":";47 os << typeString() << " " << name << ":"; 48 48 if ( get_linkage() != LinkageSpec::Cforall ) { 49 os << " " << LinkageSpec::linkageName( get_linkage());49 os << " " << LinkageSpec::linkageName( linkage ); 50 50 } // if 51 os << " with body " << has_body() << endl;51 os << " with body " << has_body(); 52 52 53 53 if ( ! parameters.empty() ) { 54 os << endl << string( indent+2, ' ' ) << "with parameters" << endl;55 printAll( parameters, os, indent+ 4);54 os << endl << indent << "... with parameters" << endl; 55 printAll( parameters, os, indent+1 ); 56 56 } // if 57 57 if ( ! members.empty() ) { 58 os << endl << string( indent+2, ' ' ) << "with members" << endl;59 printAll( members, os, indent+ 4);58 os << endl << indent << "... with members" << endl; 59 printAll( members, os, indent+1 ); 60 60 } // if 61 61 if ( ! attributes.empty() ) { 62 os << endl << string( indent+2, ' ' ) << "with attributes" << endl;63 printAll( attributes, os, indent+ 4);62 os << endl << indent << "... with attributes" << endl; 63 printAll( attributes, os, indent+1 ); 64 64 } // if 65 os << endl; 65 66 } 66 67 67 void AggregateDecl::printShort( std::ostream &os, intindent ) const {68 void AggregateDecl::printShort( std::ostream &os, Indenter indent ) const { 68 69 using std::string; 69 70 using std::endl; 70 71 71 os << typeString() << " " << get_name(); 72 os << string( indent+2, ' ' ) << "with body " << has_body() << endl; 72 os << typeString() << " " << name << " with body " << has_body() << endl; 73 73 74 74 if ( ! parameters.empty() ) { 75 os << endl << string( indent+2, ' ' ) << "with parameters" << endl;76 printAll( parameters, os, indent+ 4);75 os << indent << "... with parameters" << endl; 76 printAll( parameters, os, indent+1 ); 77 77 } // if 78 78 }
Note:
See TracChangeset
for help on using the changeset viewer.