Changeset 89231bc for src/SynTree/Expression.cc
- Timestamp:
- Apr 26, 2016, 12:55:40 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, with_gc
- Children:
- 60089f4, 668edd6b
- Parents:
- dc5376a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
rdc5376a r89231bc 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 : Fri Apr 8 17:16:23201611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Apr 26 12:52:40 2016 13 13 // Update Count : 40 14 14 // … … 93 93 94 94 void VariableExpr::print( std::ostream &os, int indent ) const { 95 os << std::string( indent, ' ' ) <<"Variable Expression: ";95 os << "Variable Expression: "; 96 96 97 97 Declaration *decl = get_var(); … … 122 122 123 123 void SizeofExpr::print( std::ostream &os, int indent) const { 124 os << std::string( indent, ' ' ) <<"Sizeof Expression on: ";124 os << "Sizeof Expression on: "; 125 125 126 126 if (isType) … … 295 295 296 296 void CastExpr::print( std::ostream &os, int indent ) const { 297 os << std::string( indent, ' ' ) << "Cast of:" << std::endl;297 os << "Cast of:" << std::endl << std::string( indent+2, ' ' ); 298 298 arg->print(os, indent+2); 299 299 os << std::endl << std::string( indent, ' ' ) << "to:" << std::endl; … … 318 318 319 319 void UntypedMemberExpr::print( std::ostream &os, int indent ) const { 320 os << std::string( indent, ' ' ) << "Member Expression, with field: " << get_member();320 os << "Untyped Member Expression, with field: " << get_member(); 321 321 322 322 Expression *agg = get_aggregate(); 323 323 os << std::string( indent, ' ' ) << "from aggregate: "; 324 if (agg != 0) agg->print(os, indent + 2); 324 if (agg != 0) { 325 os << std::string( indent+2, ' ' ); 326 agg->print(os, indent + 2); 327 } 328 os << std::string( indent+2, ' ' ); 325 329 Expression::print( os, indent ); 326 330 } … … 345 349 346 350 void MemberExpr::print( std::ostream &os, int indent ) const { 347 os << std::string( indent, ' ' ) <<"Member Expression, with field: " << std::endl;351 os << "Member Expression, with field: " << std::endl; 348 352 349 353 assert( member ); … … 354 358 Expression *agg = get_aggregate(); 355 359 os << std::string( indent, ' ' ) << "from aggregate: " << std::endl; 356 if (agg != 0) agg->print(os, indent + 2); 360 if (agg != 0) { 361 os << std::string( indent+2, ' ' ); 362 agg->print(os, indent + 2); 363 } 364 os << std::string( indent+2, ' ' ); 357 365 Expression::print( os, indent ); 358 366 } … … 372 380 373 381 void UntypedExpr::print( std::ostream &os, int indent ) const { 374 os << std::string( indent, ' ' ) << "Applying untyped: " << std::endl; 382 os << "Applying untyped: " << std::endl; 383 os << std::string( indent, ' ' ); 375 384 function->print(os, indent + 4); 376 385 os << std::string( indent, ' ' ) << "...to: " << std::endl; 386 os << std::string( indent, ' ' ); 377 387 printArgs(os, indent + 4); 378 388 Expression::print( os, indent ); … … 393 403 394 404 void NameExpr::print( std::ostream &os, int indent ) const { 395 os << std::string( indent, ' ' ) <<"Name: " << get_name() << std::endl;405 os << "Name: " << get_name() << std::endl; 396 406 Expression::print( os, indent ); 397 407 }
Note:
See TracChangeset
for help on using the changeset viewer.