Changes in src/Common/PassVisitor.impl.h [d8893ca:ba3706f]
- File:
-
- 1 edited
-
src/Common/PassVisitor.impl.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.impl.h
rd8893ca rba3706f 55 55 it, 56 56 [](Declaration * decl) -> auto { 57 return new DeclStmt( noLabels,decl );57 return new DeclStmt( decl ); 58 58 } 59 59 ); … … 251 251 || ( empty( beforeDecls ) && empty( afterDecls )) ); 252 252 253 CompoundStmt *compound = new CompoundStmt( noLabels);253 CompoundStmt *compound = new CompoundStmt(); 254 254 if( !empty(beforeDecls) ) { splice( std::back_inserter( compound->get_kids() ), beforeDecls ); } 255 255 if( !empty(beforeStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *beforeStmts ); } … … 985 985 } 986 986 987 988 989 //--------------------------------------------------------------------------990 // NullStmt991 template< typename pass_type >992 void PassVisitor< pass_type >::visit( WithStmt * node ) {993 VISIT_START( node );994 maybeAccept_impl( node->exprs, *this );995 {996 // catch statements introduce a level of scope (for the caught exception)997 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );998 indexerAddWith( node );999 maybeAccept_impl( node->stmt, *this );1000 }1001 VISIT_END( node );1002 }1003 1004 template< typename pass_type >1005 Statement * PassVisitor< pass_type >::mutate( WithStmt * node ) {1006 MUTATE_START( node );1007 maybeMutate_impl( node->exprs, *this );1008 {1009 // catch statements introduce a level of scope (for the caught exception)1010 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );1011 indexerAddWith( node );1012 maybeMutate_impl( node->stmt, *this );1013 }1014 MUTATE_END( Statement, node );1015 }1016 1017 987 //-------------------------------------------------------------------------- 1018 988 // NullStmt
Note:
See TracChangeset
for help on using the changeset viewer.