Changeset b29f8f3 for src/SynTree/Statement.cc
- Timestamp:
- Jul 29, 2015, 12:07:38 PM (10 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:
- 093f1a0
- Parents:
- 1e8f143 (diff), 51b986f (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. - File:
-
- 1 edited
-
src/SynTree/Statement.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.cc
r1e8f143 rb29f8f3 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon Jun 29 17:37:10 201513 // Update Count : 2 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jul 15 14:57:40 2015 13 // Update Count : 27 14 14 // 15 15 … … 192 192 } 193 193 194 ForStmt::ForStmt( std::list<Label> labels, Statement *initialization_, Expression *condition_, Expression *increment_, Statement *body_ ):194 ForStmt::ForStmt( std::list<Label> labels, std::list<Statement *> initialization_, Expression *condition_, Expression *increment_, Statement *body_ ): 195 195 Statement( labels ), initialization( initialization_ ), condition( condition_ ), increment( increment_ ), body( body_ ) { 196 196 } 197 197 198 198 ForStmt::~ForStmt() { 199 delete initialization;199 deleteAll( initialization ); 200 200 delete condition; 201 201 delete increment; … … 213 213 214 214 os << string( indent + 2, ' ' ) << "initialization: \n"; 215 if ( initialization != 0 ) 216 initialization->print( os, indent + 4 ); 215 for ( std::list<Statement *>::const_iterator it = initialization.begin(); it != initialization.end(); ++it ) { 216 (*it)->print( os, indent + 4 ); 217 } 217 218 218 219 os << "\n" << string( indent + 2, ' ' ) << "condition: \n";
Note:
See TracChangeset
for help on using the changeset viewer.