Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r37cdd97 r07de76b  
    493493        }
    494494
    495         const ast::Stmt * visit(const ast::SuspendStmt * node ) override final {
    496                 if ( inCache( node ) ) return nullptr;
    497                 auto stmt = new SuspendStmt();
    498                 stmt->then   = get<CompoundStmt>().accept1( node->then   );
    499                 switch(node->type) {
    500                         case ast::SuspendStmt::None     : stmt->type = SuspendStmt::None     ; break;
    501                         case ast::SuspendStmt::Coroutine: stmt->type = SuspendStmt::Coroutine; break;
    502                         case ast::SuspendStmt::Generator: stmt->type = SuspendStmt::Generator; break;
    503                 }
    504                 return stmtPostamble( stmt, node );
    505         }
    506 
    507495        const ast::Stmt * visit( const ast::WaitForStmt * node ) override final {
    508496                if ( inCache( node ) ) return nullptr;
     
    18711859        }
    18721860
    1873         virtual void visit( const SuspendStmt * old ) override final {
    1874                 if ( inCache( old ) ) return;
    1875                 ast::SuspendStmt::Type type;
    1876                 switch (old->type) {
    1877                         case SuspendStmt::Coroutine: type = ast::SuspendStmt::Coroutine; break;
    1878                         case SuspendStmt::Generator: type = ast::SuspendStmt::Generator; break;
    1879                         case SuspendStmt::None     : type = ast::SuspendStmt::None     ; break;
    1880                         default: abort();
    1881                 }
    1882                 this->node = new ast::SuspendStmt(
    1883                         old->location,
    1884                         GET_ACCEPT_1(then  , CompoundStmt),
    1885                         type,
    1886                         GET_LABELS_V(old->labels)
    1887                 );
    1888                 cache.emplace( old, this->node );
    1889         }
    1890 
    18911861        virtual void visit( const WaitForStmt * old ) override final {
    18921862                if ( inCache( old ) ) return;
Note: See TracChangeset for help on using the changeset viewer.