Changeset 6840e7c for src/SynTree/NamedTypeDecl.cc
- Timestamp:
- Oct 19, 2017, 12:01:04 PM (8 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 837ce06
- Parents:
- b96ec83 (diff), a15b72c (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/NamedTypeDecl.cc
rb96ec83 r6840e7c 38 38 } 39 39 40 void NamedTypeDecl::print( std::ostream &os, intindent ) const {40 void NamedTypeDecl::print( std::ostream &os, Indenter indent ) const { 41 41 using namespace std; 42 42 43 if ( get_name() != "" ) { 44 os << get_name() << ": "; 45 } // if 46 if ( get_linkage() != LinkageSpec::Cforall ) { 47 os << LinkageSpec::linkageName( get_linkage() ) << " "; 43 if ( name != "" ) os << name << ": "; 44 45 if ( linkage != LinkageSpec::Cforall ) { 46 os << LinkageSpec::linkageName( linkage ) << " "; 48 47 } // if 49 48 get_storageClasses().print( os ); … … 51 50 if ( base ) { 52 51 os << " for "; 53 base->print( os, indent );52 base->print( os, indent+1 ); 54 53 } // if 55 54 if ( ! parameters.empty() ) { 56 os << endl << string( indent, ' ' ) << "with parameters" << endl;57 printAll( parameters, os, indent+ 2);55 os << endl << indent << "... with parameters" << endl; 56 printAll( parameters, os, indent+1 ); 58 57 } // if 59 58 if ( ! assertions.empty() ) { 60 os << endl << string( indent, ' ' ) << "with assertions" << endl;61 printAll( assertions, os, indent+ 2);59 os << endl << indent << "... with assertions" << endl; 60 printAll( assertions, os, indent+1 ); 62 61 } // if 63 62 } 64 63 65 void NamedTypeDecl::printShort( std::ostream &os, intindent ) const {64 void NamedTypeDecl::printShort( std::ostream &os, Indenter indent ) const { 66 65 using namespace std; 67 66 68 if ( get_name() != "" ) { 69 os << get_name() << ": "; 70 } // if 67 if ( name != "" ) os << name << ": "; 71 68 get_storageClasses().print( os ); 72 69 os << typeString(); 73 70 if ( base ) { 74 71 os << " for "; 75 base->print( os, indent );72 base->print( os, indent+1 ); 76 73 } // if 77 74 if ( ! parameters.empty() ) { 78 os << endl << string( indent, ' ' ) << "with parameters" << endl;79 printAll( parameters, os, indent+ 2);75 os << endl << indent << "... with parameters" << endl; 76 printAll( parameters, os, indent+1 ); 80 77 } // if 81 78 }
Note:
See TracChangeset
for help on using the changeset viewer.