Changes in src/AST/Convert.cpp [c86b08d:835d6e8]
- File:
-
- 1 edited
-
src/AST/Convert.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
rc86b08d r835d6e8 559 559 auto stmt = new SuspendStmt(); 560 560 stmt->then = get<CompoundStmt>().accept1( node->then ); 561 switch (node->type) {561 switch (node->kind) { 562 562 case ast::SuspendStmt::None : stmt->type = SuspendStmt::None ; break; 563 563 case ast::SuspendStmt::Coroutine: stmt->type = SuspendStmt::Coroutine; break; … … 565 565 } 566 566 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;573 567 } 574 568 … … 579 573 for ( auto clause : node->clauses ) { 580 574 stmt->clauses.push_back({{ 581 get<Expression>().accept1( clause->target ),575 get<Expression>().accept1( clause->target_func ), 582 576 get<Expression>().acceptL( clause->target_args ), 583 577 }, 584 578 get<Statement>().accept1( clause->stmt ), 585 get<Expression>().accept1( clause-> when_cond ),579 get<Expression>().accept1( clause->cond ), 586 580 }); 587 581 } … … 600 594 const ast::WaitForClause * visit( const ast::WaitForClause * node ) override final { 601 595 // 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.608 596 assert( !node ); 609 597 return nullptr; … … 1695 1683 GET_ACCEPT_V(attributes, Attribute), 1696 1684 { old->get_funcSpec().val }, 1697 old->type->isVarArgs1685 (old->type->isVarArgs) ? ast::VariableArgs : ast::FixedArgs 1698 1686 }; 1699 1687 … … 2001 1989 GET_ACCEPT_1(else_, Stmt), 2002 1990 GET_ACCEPT_V(initialization, Stmt), 2003 old->isDoWhile,1991 (old->isDoWhile) ? ast::DoWhile : ast::While, 2004 1992 GET_LABELS_V(old->labels) 2005 1993 ); … … 2143 2131 virtual void visit( const SuspendStmt * old ) override final { 2144 2132 if ( inCache( old ) ) return; 2145 ast::SuspendStmt:: Typetype;2133 ast::SuspendStmt::Kind type; 2146 2134 switch (old->type) { 2147 2135 case SuspendStmt::Coroutine: type = ast::SuspendStmt::Coroutine; break; … … 2170 2158 auto clause = new ast::WaitForClause( old->location ); 2171 2159 2172 clause->target = GET_ACCEPT_1(clauses[i].target.function, Expr);2160 clause->target_func = GET_ACCEPT_1(clauses[i].target.function, Expr); 2173 2161 clause->target_args = GET_ACCEPT_V(clauses[i].target.arguments, Expr); 2174 2162 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); 2176 2164 2177 2165 stmt->clauses.push_back( clause );
Note:
See TracChangeset
for help on using the changeset viewer.