Changeset 4e06c1e for src/SynTree/Statement.cc
- Timestamp:
- Jul 12, 2016, 6:34:10 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- e4d3ceb
- Parents:
- 6e4b913
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.cc
r6e4b913 r4e06c1e 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 : T hu May 12 13:33:18201613 // Update Count : 5 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:52:32 2016 13 // Update Count : 55 14 14 // 15 15 … … 206 206 for ( i = stmts.begin(); i != stmts.end(); i++) 207 207 (*i )->print( os, indent + 4 ); 208 }209 210 //ChooseStmt::ChooseStmt( std::list<Label> labels, Expression *condition, Statement *body ) {}211 ChooseStmt::ChooseStmt( std::list<Label> _labels, Expression * _condition, std::list<Statement *> &_branches ):212 Statement( _labels ), condition( _condition ), branches( _branches ) {213 }214 215 ChooseStmt::ChooseStmt( const ChooseStmt & other ):216 Statement( other ), condition( maybeClone( other.condition ) ) {217 cloneAll( other.branches, branches );218 }219 220 ChooseStmt::~ChooseStmt() {221 delete condition;222 }223 224 void ChooseStmt::add_case( CaseStmt *c ) {}225 226 void ChooseStmt::print( std::ostream &os, int indent ) const {227 os << "Choose on condition: ";228 condition->print( os );229 os << endl;230 231 // branches232 std::list<Statement *>::const_iterator i;233 for ( i = branches.begin(); i != branches.end(); i++)234 (*i )->print( os, indent + 4 );235 236 //for_each( branches.begin(), branches.end(), mem_fun( bind1st(&Statement::print ), os ));237 }238 239 void FallthruStmt::print( std::ostream &os, int indent ) const {240 os << string( indent, ' ' ) << "Fall-through statement" << endl;241 208 } 242 209
Note: See TracChangeset
for help on using the changeset viewer.