Ignore:
Timestamp:
Mar 6, 2024, 6:06:43 AM (4 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
647d633
Parents:
bbf2cb1 (diff), af60383 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/InitializerNode.cc

    rbbf2cb1 rf6e8c67  
    3636                : expr( _expr ), aggregate( aggrp ), designator( des ), kids( nullptr ), maybeConstructed( true ), isDelete( false ) {
    3737        if ( aggrp )
    38                 kids = dynamic_cast< InitializerNode * >( get_next() );
     38                kids = next;
    3939
    4040        if ( kids )
     
    4848
    4949        if ( aggrp )
    50                 kids = dynamic_cast< InitializerNode * >( get_next() );
     50                kids = next;
    5151
    5252        if ( kids )
    53                 set_next( nullptr );
     53                next = nullptr;
    5454} // InitializerNode::InitializerNode
    5555
     
    7373                        while ( curdes != nullptr) {
    7474                                curdes->printOneLine(os);
    75                                 curdes = (ExpressionNode *)(curdes->get_next());
     75                                curdes = curdes->next;
    7676                                if ( curdes ) os << ", ";
    7777                        } // while
     
    8787
    8888        InitializerNode *moreInit;
    89         if ( (moreInit = dynamic_cast< InitializerNode * >( get_next() ) ) ) {
     89        if ( ( moreInit = next ) ) {
    9090                moreInit->printOneLine( os );
    9191        } // if
     
    9898                std::vector<ast::ptr<ast::Designation>> designlist;
    9999                InitializerNode * child = next_init();
    100                 for ( ; child != nullptr ; child = dynamic_cast< InitializerNode * >( child->get_next() ) ) {
     100                for ( ; child != nullptr ; child = child->next ) {
    101101                        std::deque<ast::ptr<ast::Expr>> desList;
    102102                        buildList( child->designator, desList );
Note: See TracChangeset for help on using the changeset viewer.