Changes in src/CodeGen/CodeGenerator.cc [145f1fc:721f17a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r145f1fc r721f17a 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Jul 15 14:47:42201513 // Update Count : 1 7711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 26 16:52:58 2015 13 // Update Count : 144 14 14 // 15 15 … … 38 38 int CodeGenerator::tabsize = 4; 39 39 40 // the kinds of statements that would ideally be followed bywhitespace40 // the kinds of statements that would ideally be separated by more whitespace 41 41 bool wantSpacing( Statement * stmt) { 42 42 return dynamic_cast< IfStmt * >( stmt ) || dynamic_cast< CompoundStmt * >( stmt ) || … … 588 588 589 589 void CodeGenerator::visit( ForStmt *forStmt ) { 590 // initialization is always hoisted, so don't 591 // bother doing anything with that 592 output << "for (;"; 593 590 output << "for ("; 591 592 if ( forStmt->get_initialization() != 0 ) 593 forStmt->get_initialization()->accept( *this ); 594 else 595 output << ";"; 596 594 597 if ( forStmt->get_condition() != 0 ) 595 598 forStmt->get_condition()->accept( *this );
Note:
See TracChangeset
for help on using the changeset viewer.