Ignore:
Timestamp:
Feb 1, 2022, 8:22:12 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
fde0a58
Parents:
729c991
Message:

change class name WhileStmt? to WhileDoStmt?, add else clause to WhileDoStmt? and ForStmt?, change names thenPart/ElsePart to then/else_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.impl.hpp

    r729c991 r3b0bc16  
    756756                maybe_accept( node, &IfStmt::inits    );
    757757                maybe_accept( node, &IfStmt::cond     );
    758                 maybe_accept_as_compound( node, &IfStmt::thenPart );
    759                 maybe_accept_as_compound( node, &IfStmt::elsePart );
     758                maybe_accept_as_compound( node, &IfStmt::then );
     759                maybe_accept_as_compound( node, &IfStmt::else_ );
    760760        }
    761761
     
    764764
    765765//--------------------------------------------------------------------------
    766 // WhileStmt
    767 template< typename core_t >
    768 const ast::Stmt * ast::Pass< core_t >::visit( const ast::WhileStmt * node ) {
     766// WhileDoStmt
     767template< typename core_t >
     768const ast::Stmt * ast::Pass< core_t >::visit( const ast::WhileDoStmt * node ) {
    769769        VISIT_START( node );
    770770
     
    772772                // while statements introduce a level of scope (for the initialization)
    773773                guard_symtab guard { *this };
    774                 maybe_accept( node, &WhileStmt::inits );
    775                 maybe_accept( node, &WhileStmt::cond  );
    776                 maybe_accept_as_compound( node, &WhileStmt::body  );
     774                maybe_accept( node, &WhileDoStmt::inits );
     775                maybe_accept( node, &WhileDoStmt::cond  );
     776                maybe_accept_as_compound( node, &WhileDoStmt::body  );
    777777        }
    778778
Note: See TracChangeset for help on using the changeset viewer.