Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.cpp

    r16afb2a r59c8dff  
    175175                }
    176176
     177                os << " " << (node->body ? "with" : "without") << " body";
     178
     179                if ( ! node->params.empty() ) {
     180                        os << endl << indent << "... with parameters" << endl;
     181                        ++indent;
     182                        printAll( node->params );
     183                        --indent;
     184                }
     185
     186                if ( ! short_mode && ! node->members.empty() ) {
     187                        os << endl << indent << "... with members" << endl;
     188                        ++indent;
     189                        printAll( node->members );
     190                        --indent;
     191                }
     192
     193                if ( ! short_mode && ! node->attributes.empty() ) {
     194                        os << endl << indent << "... with attributes" << endl;
     195                        ++indent;
     196                        printAll( node->attributes );
     197                        --indent;
     198                }
     199
    177200                auto ptrToEnum = dynamic_cast<const ast::EnumDecl *>(node);
    178201                if ( ! short_mode && ptrToEnum && ptrToEnum->base ) {
    179                         os << endl << indent << "... with base type" << endl;
    180                         ++indent;
    181                         os << indent;
     202                        os << endl << indent << ".. with (enum) base" << endl;
     203                        ++indent;
    182204                        ptrToEnum->base->accept( *this );
    183205                        --indent;
    184206                }
    185 
    186                 os << " " << (node->body ? "with" : "without") << " body";
    187 
    188                 if ( ! node->params.empty() ) {
    189                         os << endl << indent << "... with parameters" << endl;
    190                         ++indent;
    191                         printAll( node->params );
    192                         --indent;
    193                 }
    194 
    195                 if ( ! short_mode && ! node->members.empty() ) {
    196                         os << endl << indent << "... with members" << endl;
    197                         ++indent;
    198                         printAll( node->members );
    199                         --indent;
    200                 }
    201 
    202                 if ( ! short_mode && ! node->attributes.empty() ) {
    203                         os << endl << indent << "... with attributes" << endl;
    204                         ++indent;
    205                         printAll( node->attributes );
    206                         --indent;
    207                 }
    208 
    209 
    210207
    211208                os << endl;
Note: See TracChangeset for help on using the changeset viewer.