Ignore:
Timestamp:
May 1, 2023, 4:06:07 PM (3 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master, stuck-waitfor-destruct
Children:
a33a5e2
Parents:
73bf7ddc
Message:

added support for the waituntil statement in the compiler

File:
1 edited

Legend:

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

    r73bf7ddc rc86b08d  
    10661066
    10671067//--------------------------------------------------------------------------
     1068// WhenClause
     1069template< typename core_t >
     1070const ast::WhenClause * ast::Pass< core_t >::visit( const ast::WhenClause * node ) {
     1071        VISIT_START( node );
     1072
     1073        if ( __visit_children() ) {
     1074                maybe_accept( node, &WhenClause::target );
     1075                maybe_accept( node, &WhenClause::stmt );
     1076                maybe_accept( node, &WhenClause::when_cond );
     1077        }
     1078
     1079        VISIT_END( WhenClause, node );
     1080}
     1081
     1082//--------------------------------------------------------------------------
    10681083// WaitForStmt
    10691084template< typename core_t >
     
    10901105
    10911106        if ( __visit_children() ) {
    1092                 maybe_accept( node, &WaitForClause::target_func );
     1107                maybe_accept( node, &WaitForClause::target );
    10931108                maybe_accept( node, &WaitForClause::target_args );
    10941109                maybe_accept( node, &WaitForClause::stmt );
    1095                 maybe_accept( node, &WaitForClause::cond );
     1110                maybe_accept( node, &WaitForClause::when_cond );
    10961111        }
    10971112
    10981113        VISIT_END( WaitForClause, node );
     1114}
     1115
     1116//--------------------------------------------------------------------------
     1117// WaitUntilStmt
     1118template< typename core_t >
     1119const ast::Stmt * ast::Pass< core_t >::visit( const ast::WaitUntilStmt * node ) {
     1120        VISIT_START( node );
     1121
     1122        if ( __visit_children() ) {
     1123                maybe_accept( node, &WaitUntilStmt::clauses );
     1124                maybe_accept( node, &WaitUntilStmt::timeout_time );
     1125                maybe_accept( node, &WaitUntilStmt::timeout_stmt );
     1126                maybe_accept( node, &WaitUntilStmt::timeout_cond );
     1127                maybe_accept( node, &WaitUntilStmt::else_stmt );
     1128                maybe_accept( node, &WaitUntilStmt::else_cond );
     1129        }
     1130
     1131        VISIT_END( Stmt, node );
    10991132}
    11001133
Note: See TracChangeset for help on using the changeset viewer.