Changeset 145f1fc for src/ResolvExpr
- Timestamp:
- Jul 15, 2015, 2:59:57 PM (9 years ago)
- 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:
- 1ab4ce2, 2794fff, e45215c
- Parents:
- 85c4ef0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r85c4ef0 r145f1fc 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 12:17:01 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Jul 3 16:18:20201513 // Update Count : 1 5911 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jul 15 14:54:04 2015 13 // Update Count : 167 14 14 // 15 15 … … 226 226 227 227 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 233 230 if ( forStmt->get_condition() ) { 234 newExpr = findSingleExpression( forStmt->get_condition(), *this );231 Expression * newExpr = findSingleExpression( forStmt->get_condition(), *this ); 235 232 delete forStmt->get_condition(); 236 233 forStmt->set_condition( newExpr ); 237 234 } // if 238 235 239 236 if ( forStmt->get_increment() ) { 240 newExpr = findVoidExpression( forStmt->get_increment(), *this );237 Expression * newExpr = findVoidExpression( forStmt->get_increment(), *this ); 241 238 delete forStmt->get_increment(); 242 239 forStmt->set_increment( newExpr ); 243 240 } // if 244 245 maybeAccept( forStmt->get_condition(), *this );246 maybeAccept( forStmt->get_increment(), *this );247 maybeAccept( forStmt->get_body(), *this );248 leaveScope();249 241 } 250 242
Note: See TracChangeset
for help on using the changeset viewer.