Ignore:
Timestamp:
Oct 2, 2017, 4:39:42 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
bf4b4cf
Parents:
a8555c5
Message:

Refactor tree print code to use Indenter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AddressExpr.cc

    ra8555c5 r50377a4  
    6262}
    6363
    64 void AddressExpr::print( std::ostream &os, int indent ) const {
     64void AddressExpr::print( std::ostream &os, Indenter indent ) const {
    6565        os << "Address of:" << std::endl;
    6666        if ( arg ) {
    67                 os << std::string( indent+2, ' ' );
    68                 arg->print( os, indent+2 );
     67                os << indent+1;
     68                arg->print( os, indent+1 );
    6969        } // if
    7070}
     
    7777LabelAddressExpr::~LabelAddressExpr() {}
    7878
    79 void LabelAddressExpr::print( std::ostream & os, int indent ) const {
    80         os << "Address of label:" << std::endl << std::string( indent+2, ' ' ) << arg;
     79void LabelAddressExpr::print( std::ostream & os, Indenter ) const {
     80        os << "Address of label:" << arg;
    8181}
    8282
Note: See TracChangeset for help on using the changeset viewer.