Changeset 561354f for src/CodeGen


Ignore:
Timestamp:
May 17, 2023, 1:33:39 AM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT
Children:
d6c464d
Parents:
28f8f15
Message:

Save progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r28f8f15 r561354f  
    296296
    297297        void CodeGenerator::handleData( EnumDecl * dataDecl ) {
    298                 output << " /** data type */" << endl;
    299                 for ( StructDecl * decl : dataDecl->data_constructors ) {
    300                         postvisit(decl);
    301                         output << ";" << endl;
    302                 }
    303                 postvisit( dataDecl->data_union );
    304                 output << ";" << endl;
    305                 postvisit( dataDecl->tags );
    306                 output << ";" << endl;
    307                 postvisit( dataDecl->tag_union );
    308                 output << ";" << endl;
     298                // output << " /** data type */" << endl;
     299                // for ( StructDecl * decl : dataDecl->data_constructors ) {
     300                //      postvisit(decl);
     301                //      output << ";" << endl;
     302                // }
     303                // postvisit( dataDecl->data_union );
     304                // output << ";" << endl;
     305                // postvisit( dataDecl->tag );
     306                // output << ";" << endl;
     307                // postvisit( dataDecl->tag_union );
     308                // output << ";" << endl;
     309                assert(false);
    309310        }
    310311
    311312        void CodeGenerator::postvisit( EnumDecl * enumDecl ) {
    312                 if ( enumDecl->data_constructors.size() > 0 ) return handleData( enumDecl );
     313                // if ( enumDecl->data_constructors.size() > 0 ) return handleData( enumDecl );
    313314                extension( enumDecl );
    314315                std::list< Declaration* > &memb = enumDecl->get_members();
Note: See TracChangeset for help on using the changeset viewer.