Ignore:
Timestamp:
Jul 15, 2015, 4:47:48 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
1db21619
Parents:
9163b9c (diff), 1ab4ce2 (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.
Message:

Merge branch 'resolver'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r9163b9c r724c2b6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 12:17:01 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul  3 16:18:20 2015
    13 // Update Count     : 159
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed Jul 15 14:54:04 2015
     13// Update Count     : 167
    1414//
    1515
     
    226226
    227227        void Resolver::visit( ForStmt *forStmt ) {
    228             // SymTab::Indexer::visit( forStmt );
    229                 Expression *newExpr;
    230             // for statements introduce a level of scope
    231             enterScope();
    232             maybeAccept( forStmt->get_initialization(), *this );
     228                SymTab::Indexer::visit( forStmt );
     229
    233230                if ( forStmt->get_condition() ) {
    234                         newExpr = findSingleExpression( forStmt->get_condition(), *this );
     231                        Expression * newExpr = findSingleExpression( forStmt->get_condition(), *this );
    235232                        delete forStmt->get_condition();
    236233                        forStmt->set_condition( newExpr );
    237234                } // if
    238  
     235               
    239236                if ( forStmt->get_increment() ) {
    240                         newExpr = findVoidExpression( forStmt->get_increment(), *this );
     237                        Expression * newExpr = findVoidExpression( forStmt->get_increment(), *this );
    241238                        delete forStmt->get_increment();
    242239                        forStmt->set_increment( newExpr );
    243240                } // if
    244 
    245             maybeAccept( forStmt->get_condition(), *this );
    246             maybeAccept( forStmt->get_increment(), *this );
    247             maybeAccept( forStmt->get_body(), *this );
    248             leaveScope();
    249241        }
    250242
Note: See TracChangeset for help on using the changeset viewer.