Changes in src/Common/PassVisitor.impl.h [d55d7a6:0ac366b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.impl.h
rd55d7a6 r0ac366b 77 77 maybeAccept_impl( *i, visitor ); 78 78 } catch( SemanticError &e ) { 79 e.set_location( (*i)->location ); 79 80 errors.append( e ); 80 81 } … … 103 104 maybeMutate_impl( *i, mutator ); 104 105 } catch( SemanticError &e ) { 106 e.set_location( (*i)->location ); 105 107 errors.append( e ); 106 108 } … … 132 134 } 133 135 } catch( SemanticError &e ) { 136 e.set_location( (*i)->location ); 134 137 errors.append( e ); 135 138 } … … 160 163 } // if 161 164 } catch( SemanticError &e ) { 165 e.set_location( (*i)->location ); 162 166 errors.append( e ); 163 167 } // try … … 196 200 197 201 } catch ( SemanticError &e ) { 202 e.set_location( (*i)->location ); 198 203 errors.append( e ); 199 204 } … … 393 398 // shadow with exprs and not the other way around. 394 399 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); 395 indexerAddWith( node->withExprs );400 indexerAddWith( node->withExprs, node ); 396 401 { 397 402 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); … … 423 428 // shadow with exprs and not the other way around. 424 429 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); 425 indexerAddWith( node->withExprs );430 indexerAddWith( node->withExprs, node ); 426 431 { 427 432 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); … … 1064 1069 // catch statements introduce a level of scope (for the caught exception) 1065 1070 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); 1066 indexerAddWith( node->exprs );1071 indexerAddWith( node->exprs, node ); 1067 1072 maybeAccept_impl( node->stmt, *this ); 1068 1073 } … … 1077 1082 // catch statements introduce a level of scope (for the caught exception) 1078 1083 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); 1079 indexerAddWith( node->exprs );1084 indexerAddWith( node->exprs, node ); 1080 1085 maybeMutate_impl( node->stmt, *this ); 1081 1086 } … … 1971 1976 } 1972 1977 1978 //-------------------------------------------------------------------------- 1979 // DeletedExpr 1980 template< typename pass_type > 1981 void PassVisitor< pass_type >::visit( DeletedExpr * node ) { 1982 VISIT_START( node ); 1983 1984 indexerScopedAccept( node->result, *this ); 1985 maybeAccept_impl( node->expr, *this ); 1986 // don't visit deleteStmt, because it is a pointer to somewhere else in the tree. 1987 1988 VISIT_END( node ); 1989 } 1990 1991 template< typename pass_type > 1992 Expression * PassVisitor< pass_type >::mutate( DeletedExpr * node ) { 1993 MUTATE_START( node ); 1994 1995 indexerScopedMutate( node->env, *this ); 1996 indexerScopedMutate( node->result, *this ); 1997 maybeMutate_impl( node->expr, *this ); 1998 1999 MUTATE_END( Expression, node ); 2000 } 2001 2002 1973 2003 template< typename pass_type > 1974 2004 void PassVisitor< pass_type >::visit( VoidType * node ) {
Note:
See TracChangeset
for help on using the changeset viewer.