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