Changes in / [5382492:668edd6b]
- Location:
- src/SynTree
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/AddressExpr.cc
r5382492 r668edd6b 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // AddressExpr.cc -- 7 // AddressExpr.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 23:54:44 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue May 19 16:52:51 201511 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Apr 26 12:35:13 2016 13 13 // Update Count : 6 14 14 // … … 32 32 33 33 void AddressExpr::print( std::ostream &os, int indent ) const { 34 os << std::string( indent, ' ' ) <<"Address of:" << std::endl;34 os << "Address of:" << std::endl; 35 35 if ( arg ) { 36 arg->print( os, indent+2 ); 36 os << std::string( indent+2, ' ' ); 37 arg->print( os, indent+2 ); 37 38 } // if 38 39 } -
src/SynTree/ApplicationExpr.cc
r5382492 r668edd6b 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ApplicationExpr.cc.cc -- 7 // ApplicationExpr.cc.cc -- 8 8 // 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 May 18 07:54:17 201511 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Apr 26 12:41:06 2016 13 13 // Update Count : 4 14 14 // … … 47 47 FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ); 48 48 assert( function ); 49 49 50 50 for ( std::list< DeclarationWithType* >::const_iterator i = function->get_returnVals().begin(); i != function->get_returnVals().end(); ++i ) { 51 51 get_results().push_back( (*i)->get_type()->clone() ); … … 64 64 65 65 void ApplicationExpr::print( std::ostream &os, int indent ) const { 66 os << std::string( indent, ' ' ) << "Application of" << std::endl;66 os << "Application of" << std::endl << std::string(indent, ' '); 67 67 function->print( os, indent+2 ); 68 68 if ( ! args.empty() ) { -
src/SynTree/Expression.cc
r5382492 r668edd6b 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri Apr 22 16:20:43201612 // Last Modified On : Tue Apr 26 12:58:05 2016 13 13 // Update Count : 40 14 14 // … … 95 95 96 96 void VariableExpr::print( std::ostream &os, int indent ) const { 97 os << std::string( indent, ' ' ) <<"Variable Expression: ";97 os << "Variable Expression: "; 98 98 99 99 Declaration *decl = get_var(); … … 124 124 125 125 void SizeofExpr::print( std::ostream &os, int indent) const { 126 os << std::string( indent, ' ' ) <<"Sizeof Expression on: ";126 os << "Sizeof Expression on: "; 127 127 128 128 if (isType) … … 297 297 298 298 void CastExpr::print( std::ostream &os, int indent ) const { 299 os << std::string( indent, ' ' ) << "Cast of:" << std::endl;299 os << "Cast of:" << std::endl << std::string( indent+2, ' ' ); 300 300 arg->print(os, indent+2); 301 301 os << std::endl << std::string( indent, ' ' ) << "to:" << std::endl; … … 320 320 321 321 void UntypedMemberExpr::print( std::ostream &os, int indent ) const { 322 os << std::string( indent, ' ' ) << "Member Expression, with field: " << get_member();322 os << "Untyped Member Expression, with field: " << get_member(); 323 323 324 324 Expression *agg = get_aggregate(); 325 325 os << std::string( indent, ' ' ) << "from aggregate: "; 326 if (agg != 0) agg->print(os, indent + 2); 326 if (agg != 0) { 327 os << std::string( indent+2, ' ' ); 328 agg->print(os, indent + 2); 329 } 330 os << std::string( indent+2, ' ' ); 327 331 Expression::print( os, indent ); 328 332 } … … 347 351 348 352 void MemberExpr::print( std::ostream &os, int indent ) const { 349 os << std::string( indent, ' ' ) <<"Member Expression, with field: " << std::endl;353 os << "Member Expression, with field: " << std::endl; 350 354 351 355 assert( member ); … … 356 360 Expression *agg = get_aggregate(); 357 361 os << std::string( indent, ' ' ) << "from aggregate: " << std::endl; 358 if (agg != 0) agg->print(os, indent + 2); 362 if (agg != 0) { 363 os << std::string( indent+2, ' ' ); 364 agg->print(os, indent + 2); 365 } 366 os << std::string( indent+2, ' ' ); 359 367 Expression::print( os, indent ); 360 368 } … … 374 382 375 383 void UntypedExpr::print( std::ostream &os, int indent ) const { 376 os << std::string( indent, ' ' ) << "Applying untyped: " << std::endl; 384 os << "Applying untyped: " << std::endl; 385 os << std::string( indent, ' ' ); 377 386 function->print(os, indent + 4); 378 387 os << std::string( indent, ' ' ) << "...to: " << std::endl; 388 os << std::string( indent, ' ' ); 379 389 printArgs(os, indent + 4); 380 390 Expression::print( os, indent ); … … 395 405 396 406 void NameExpr::print( std::ostream &os, int indent ) const { 397 os << std::string( indent, ' ' ) <<"Name: " << get_name() << std::endl;407 os << "Name: " << get_name() << std::endl; 398 408 Expression::print( os, indent ); 399 409 } -
src/SynTree/Initializer.cc
r5382492 r668edd6b 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon Apr 11 17:36:10201612 // Last Modified On : Tue Apr 26 12:57:34 2016 13 13 // Update Count : 28 14 14 // -
src/SynTree/ObjectDecl.cc
r5382492 r668edd6b 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Feb 09 13:21:03201612 // Last Modified On : Tue Apr 26 12:56:27 2016 13 13 // Update Count : 30 14 14 // -
src/SynTree/Statement.cc
r5382492 r668edd6b 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Dec 09 14:09:34 201512 // Last Modified On : Tue Apr 26 12:33:33 2016 13 13 // Update Count : 54 14 14 // … … 43 43 44 44 void ExprStmt::print( std::ostream &os, int indent ) const { 45 os << string( indent, ' ' ) << "Expression Statement:" << endl;45 os << "Expression Statement:" << endl << std::string( indent, ' ' ); 46 46 expr->print( os, indent + 2 ); 47 47 } … … 110 110 111 111 void ReturnStmt::print( std::ostream &os, int indent ) const { 112 os << std::string( indent, ' ' ) << string ( isThrow? "Throw":"Return" ) << " Statement, returning: "; 113 if ( expr != 0 ) expr->print( os ); 112 os << string ( isThrow? "Throw":"Return" ) << " Statement, returning: "; 113 if ( expr != 0 ) { 114 os << endl << string( indent+2, ' ' ); 115 expr->print( os, indent + 2 ); 116 } 114 117 os << endl; 115 118 } … … 124 127 125 128 void IfStmt::print( std::ostream &os, int indent ) const { 126 os << string( indent, ' ' ) <<"If on condition: " << endl ;129 os << "If on condition: " << endl ; 127 130 condition->print( os, indent + 4 ); 128 131 … … 153 156 154 157 void SwitchStmt::print( std::ostream &os, int indent ) const { 155 os << string( indent, ' ' ) <<"Switch on condition: ";158 os << "Switch on condition: "; 156 159 condition->print( os ); 157 160 os << endl; … … 218 221 219 222 void ChooseStmt::print( std::ostream &os, int indent ) const { 220 os << string( indent, ' ' ) <<"Choose on condition: ";223 os << "Choose on condition: "; 221 224 condition->print( os ); 222 225 os << endl; … … 247 250 248 251 void WhileStmt::print( std::ostream &os, int indent ) const { 249 os << string( indent, ' ' ) <<"While on condition: " << endl ;252 os << "While on condition: " << endl ; 250 253 condition->print( os, indent + 4 ); 251 254 … … 273 276 274 277 void ForStmt::print( std::ostream &os, int indent ) const { 275 os << string( indent, ' ' ) <<"Labels: {";278 os << "Labels: {"; 276 279 for ( std::list<Label>::const_iterator it = get_labels().begin(); it != get_labels().end(); ++it) { 277 280 os << *it << ","; … … 314 317 315 318 void TryStmt::print( std::ostream &os, int indent ) const { 316 os << string( indent, ' ' ) <<"Try Statement" << endl;319 os << "Try Statement" << endl; 317 320 os << string( indent + 2, ' ' ) << "with block: " << endl; 318 321 block->print( os, indent + 4 ); … … 378 381 379 382 void NullStmt::print( std::ostream &os, int indent ) const { 380 os << string( indent, ' ' ) <<"Null Statement" << endl ;383 os << "Null Statement" << endl ; 381 384 } 382 385
Note: See TracChangeset
for help on using the changeset viewer.