Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.impl.h

    r0ac366b rd55d7a6  
    7777                        maybeAccept_impl( *i, visitor );
    7878                } catch( SemanticError &e ) {
    79                         e.set_location( (*i)->location );
    8079                        errors.append( e );
    8180                }
     
    104103                        maybeMutate_impl( *i, mutator );
    105104                } catch( SemanticError &e ) {
    106                         e.set_location( (*i)->location );
    107105                        errors.append( e );
    108106                }
     
    134132                        }
    135133                } catch( SemanticError &e ) {
    136                         e.set_location( (*i)->location );
    137134                        errors.append( e );
    138135                }
     
    163160                        } // if
    164161                } catch( SemanticError &e ) {
    165                         e.set_location( (*i)->location );
    166162                        errors.append( e );
    167163                } // try
     
    200196
    201197                } catch ( SemanticError &e ) {
    202                         e.set_location( (*i)->location );
    203198                        errors.append( e );
    204199                }
     
    398393                // shadow with exprs and not the other way around.
    399394                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    400                 indexerAddWith( node->withExprs, node );
     395                indexerAddWith( node->withExprs );
    401396                {
    402397                        auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
     
    428423                // shadow with exprs and not the other way around.
    429424                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    430                 indexerAddWith( node->withExprs, node );
     425                indexerAddWith( node->withExprs );
    431426                {
    432427                        auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
     
    10691064                // catch statements introduce a level of scope (for the caught exception)
    10701065                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    1071                 indexerAddWith( node->exprs, node );
     1066                indexerAddWith( node->exprs );
    10721067                maybeAccept_impl( node->stmt, *this );
    10731068        }
     
    10821077                // catch statements introduce a level of scope (for the caught exception)
    10831078                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    1084                 indexerAddWith( node->exprs, node );
     1079                indexerAddWith( node->exprs );
    10851080                maybeMutate_impl( node->stmt, *this );
    10861081        }
     
    19761971}
    19771972
    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 
    20031973template< typename pass_type >
    20041974void PassVisitor< pass_type >::visit( VoidType * node ) {
Note: See TracChangeset for help on using the changeset viewer.