Changeset 50377a4 for src/SynTree/FunctionDecl.cc
- Timestamp:
- Oct 2, 2017, 4:39:42 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:
- bf4b4cf
- Parents:
- a8555c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
ra8555c5 r50377a4 63 63 } 64 64 65 void FunctionDecl::print( std::ostream &os, intindent ) const {65 void FunctionDecl::print( std::ostream &os, Indenter indent ) const { 66 66 using std::endl; 67 67 using std::string; 68 68 69 if ( get_name()!= "" ) {70 os << get_name()<< ": ";69 if ( name != "" ) { 70 os << name << ": "; 71 71 } // if 72 if ( get_linkage()!= LinkageSpec::Cforall ) {73 os << LinkageSpec::linkageName( get_linkage()) << " ";72 if ( linkage != LinkageSpec::Cforall ) { 73 os << LinkageSpec::linkageName( linkage ) << " "; 74 74 } // if 75 75 76 printAll( get_attributes(), os, indent );76 printAll( attributes, os, indent ); 77 77 78 78 get_storageClasses().print( os ); 79 79 get_funcSpec().print( os ); 80 80 81 if ( get_type()) {82 get_type()->print( os, indent );81 if ( type ) { 82 type->print( os, indent ); 83 83 } else { 84 84 os << "untyped entity "; … … 86 86 87 87 if ( statements ) { 88 os << string( indent + 2, ' ' ) << "with body " << endl; 89 os << string( indent + 4, ' ' ); 90 statements->print( os, indent + 4 ); 88 os << indent << "... with body " << endl << indent+1; 89 statements->print( os, indent+1 ); 91 90 } // if 92 91 } 93 92 94 void FunctionDecl::printShort( std::ostream &os, intindent ) const {93 void FunctionDecl::printShort( std::ostream &os, Indenter indent ) const { 95 94 using std::endl; 96 95 using std::string; 97 96 98 if ( get_name()!= "" ) {99 os << get_name()<< ": ";97 if ( name != "" ) { 98 os << name << ": "; 100 99 } // if 101 102 // xxx - should printShort print attributes?103 100 104 101 get_storageClasses().print( os ); 105 102 get_funcSpec().print( os ); 106 103 107 if ( get_type()) {108 get_type()->print( os, indent );104 if ( type ) { 105 type->print( os, indent ); 109 106 } else { 110 107 os << "untyped entity ";
Note: See TracChangeset
for help on using the changeset viewer.