Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    rc86b08d r835d6e8  
    559559                auto stmt = new SuspendStmt();
    560560                stmt->then   = get<CompoundStmt>().accept1( node->then   );
    561                 switch(node->type) {
     561                switch (node->kind) {
    562562                        case ast::SuspendStmt::None     : stmt->type = SuspendStmt::None     ; break;
    563563                        case ast::SuspendStmt::Coroutine: stmt->type = SuspendStmt::Coroutine; break;
     
    565565                }
    566566                return stmtPostamble( stmt, node );
    567         }
    568 
    569     const ast::WhenClause * visit( const ast::WhenClause * node ) override final {
    570                 // There is no old-AST WhenClause, so this should never be called.
    571                 assert( !node );
    572                 return nullptr;
    573567        }
    574568
     
    579573                for ( auto clause : node->clauses ) {
    580574                        stmt->clauses.push_back({{
    581                                         get<Expression>().accept1( clause->target ),
     575                                        get<Expression>().accept1( clause->target_func ),
    582576                                        get<Expression>().acceptL( clause->target_args ),
    583577                                },
    584578                                get<Statement>().accept1( clause->stmt ),
    585                                 get<Expression>().accept1( clause->when_cond ),
     579                                get<Expression>().accept1( clause->cond ),
    586580                        });
    587581                }
     
    600594        const ast::WaitForClause * visit( const ast::WaitForClause * node ) override final {
    601595                // There is no old-AST WaitForClause, so this should never be called.
    602                 assert( !node );
    603                 return nullptr;
    604         }
    605 
    606     const ast::Stmt * visit( const ast::WaitUntilStmt * node ) override final {
    607         // There is no old-AST WaitUntilStmt, so this should never be called.
    608596                assert( !node );
    609597                return nullptr;
     
    16951683                        GET_ACCEPT_V(attributes, Attribute),
    16961684                        { old->get_funcSpec().val },
    1697                         old->type->isVarArgs
     1685                        (old->type->isVarArgs) ? ast::VariableArgs : ast::FixedArgs
    16981686                };
    16991687
     
    20011989                        GET_ACCEPT_1(else_, Stmt),
    20021990                        GET_ACCEPT_V(initialization, Stmt),
    2003                         old->isDoWhile,
     1991                        (old->isDoWhile) ? ast::DoWhile : ast::While,
    20041992                        GET_LABELS_V(old->labels)
    20051993                );
     
    21432131        virtual void visit( const SuspendStmt * old ) override final {
    21442132                if ( inCache( old ) ) return;
    2145                 ast::SuspendStmt::Type type;
     2133                ast::SuspendStmt::Kind type;
    21462134                switch (old->type) {
    21472135                        case SuspendStmt::Coroutine: type = ast::SuspendStmt::Coroutine; break;
     
    21702158                        auto clause = new ast::WaitForClause( old->location );
    21712159
    2172                         clause->target = GET_ACCEPT_1(clauses[i].target.function, Expr);
     2160                        clause->target_func = GET_ACCEPT_1(clauses[i].target.function, Expr);
    21732161                        clause->target_args = GET_ACCEPT_V(clauses[i].target.arguments, Expr);
    21742162                        clause->stmt = GET_ACCEPT_1(clauses[i].statement, Stmt);
    2175                         clause->when_cond = GET_ACCEPT_1(clauses[i].condition, Expr);
     2163                        clause->cond = GET_ACCEPT_1(clauses[i].condition, Expr);
    21762164
    21772165                        stmt->clauses.push_back( clause );
Note: See TracChangeset for help on using the changeset viewer.