Changeset 16afb2a


Ignore:
Timestamp:
Jan 27, 2024, 4:05:12 AM (3 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
c75b30a
Parents:
71b5aad5
Message:

Fix the print for enum with type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.cpp

    r71b5aad5 r16afb2a  
    175175                }
    176176
     177                auto ptrToEnum = dynamic_cast<const ast::EnumDecl *>(node);
     178                if ( ! short_mode && ptrToEnum && ptrToEnum->base ) {
     179                        os << endl << indent << "... with base type" << endl;
     180                        ++indent;
     181                        os << indent;
     182                        ptrToEnum->base->accept( *this );
     183                        --indent;
     184                }
     185
    177186                os << " " << (node->body ? "with" : "without") << " body";
    178187
     
    198207                }
    199208
    200                 auto ptrToEnum = dynamic_cast<const ast::EnumDecl *>(node);
    201                 if ( ! short_mode && ptrToEnum && ptrToEnum->base ) {
    202                         os << endl << indent << ".. with (enum) base" << endl;
    203                         ++indent;
    204                         ptrToEnum->base->accept( *this );
    205                         --indent;
    206                 }
     209
    207210
    208211                os << endl;
Note: See TracChangeset for help on using the changeset viewer.