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