Changeset 5541a44e for src


Ignore:
Timestamp:
Apr 11, 2023, 1:12:22 PM (13 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
b05beaa
Parents:
6611177
Message:

Missed some uses of the new parser helpers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/StatementNode.cc

    r6611177 r5541a44e  
    141141        ast::Expr * astcond = build_if_control( ctl, astinit ); // ctl deleted, cond/init set
    142142
    143         std::vector<ast::ptr<ast::Stmt>> aststmt;
    144         buildMoveList( then, aststmt );
    145         assert( aststmt.size() == 1 );
    146         ast::Stmt const * astthen = aststmt.front().release();
    147 
    148         ast::Stmt const * astelse = nullptr;
    149         if ( else_ ) {
    150                 astelse = buildMoveSingle( else_ );
    151         } // if
     143        ast::Stmt const * astthen = buildMoveSingle( then );
     144        ast::Stmt const * astelse = buildMoveOptional( else_ );
    152145
    153146        return new ast::IfStmt( location, astcond, astthen, astelse,
Note: See TracChangeset for help on using the changeset viewer.