Changeset 5b544a6 for src/AST/Convert.cpp
- Timestamp:
- Mar 9, 2020, 11:09:52 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 6565321
- Parents:
- 87f572e (diff), e6cfa8ff (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r87f572e r5b544a6 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 495 507 const ast::Stmt * visit( const ast::WaitForStmt * node ) override final { 496 508 if ( inCache( node ) ) return nullptr; … … 1859 1871 } 1860 1872 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 1861 1891 virtual void visit( const WaitForStmt * old ) override final { 1862 1892 if ( inCache( old ) ) return;
Note: See TracChangeset
for help on using the changeset viewer.