Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r835d6e8 rc86b08d  
    559559                auto stmt = new SuspendStmt();
    560560                stmt->then   = get<CompoundStmt>().accept1( node->then   );
    561                 switch (node->kind) {
     561                switch(node->type) {
    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;
    567573        }
    568574
     
    573579                for ( auto clause : node->clauses ) {
    574580                        stmt->clauses.push_back({{
    575                                         get<Expression>().accept1( clause->target_func ),
     581                                        get<Expression>().accept1( clause->target ),
    576582                                        get<Expression>().acceptL( clause->target_args ),
    577583                                },
    578584                                get<Statement>().accept1( clause->stmt ),
    579                                 get<Expression>().accept1( clause->cond ),
     585                                get<Expression>().accept1( clause->when_cond ),
    580586                        });
    581587                }
     
    594600        const ast::WaitForClause * visit( const ast::WaitForClause * node ) override final {
    595601                // 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.
    596608                assert( !node );
    597609                return nullptr;
     
    16831695                        GET_ACCEPT_V(attributes, Attribute),
    16841696                        { old->get_funcSpec().val },
    1685                         (old->type->isVarArgs) ? ast::VariableArgs : ast::FixedArgs
     1697                        old->type->isVarArgs
    16861698                };
    16871699
     
    19892001                        GET_ACCEPT_1(else_, Stmt),
    19902002                        GET_ACCEPT_V(initialization, Stmt),
    1991                         (old->isDoWhile) ? ast::DoWhile : ast::While,
     2003                        old->isDoWhile,
    19922004                        GET_LABELS_V(old->labels)
    19932005                );
     
    21312143        virtual void visit( const SuspendStmt * old ) override final {
    21322144                if ( inCache( old ) ) return;
    2133                 ast::SuspendStmt::Kind type;
     2145                ast::SuspendStmt::Type type;
    21342146                switch (old->type) {
    21352147                        case SuspendStmt::Coroutine: type = ast::SuspendStmt::Coroutine; break;
     
    21582170                        auto clause = new ast::WaitForClause( old->location );
    21592171
    2160                         clause->target_func = GET_ACCEPT_1(clauses[i].target.function, Expr);
     2172                        clause->target = GET_ACCEPT_1(clauses[i].target.function, Expr);
    21612173                        clause->target_args = GET_ACCEPT_V(clauses[i].target.arguments, Expr);
    21622174                        clause->stmt = GET_ACCEPT_1(clauses[i].statement, Stmt);
    2163                         clause->cond = GET_ACCEPT_1(clauses[i].condition, Expr);
     2175                        clause->when_cond = GET_ACCEPT_1(clauses[i].condition, Expr);
    21642176
    21652177                        stmt->clauses.push_back( clause );
Note: See TracChangeset for help on using the changeset viewer.