Changes in src/AST/Convert.cpp [37cdd97:07de76b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r37cdd97 r07de76b 493 493 } 494 494 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 507 495 const ast::Stmt * visit( const ast::WaitForStmt * node ) override final { 508 496 if ( inCache( node ) ) return nullptr; … … 1871 1859 } 1872 1860 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 1891 1861 virtual void visit( const WaitForStmt * old ) override final { 1892 1862 if ( inCache( old ) ) return;
Note: See TracChangeset
for help on using the changeset viewer.