Changeset 668edd6b for src/SynTree/Expression.cc
- Timestamp:
- Apr 26, 2016, 12:58:14 PM (8 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:
- 1b31345
- Parents:
- 5382492 (diff), 89231bc (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
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.