Changeset d668182


Ignore:
Timestamp:
May 13, 2016, 1:28:17 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
102b0cd
Parents:
7b3f66b (diff), bb8ea30 (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.
Message:

Merge branch 'fix-tree-printing' into ctor

Conflicts:

src/SynTree/Expression.cc
src/SynTree/Initializer.cc
src/SynTree/ObjectDecl.cc

Location:
src/SynTree
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/ArrayType.cc

    r7b3f66b rd668182  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ArrayType.cc -- 
     7// ArrayType.cc --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Aug 12 14:19:07 2015
     12// Last Modified On : Thu May 12 14:07:16 2016
    1313// Update Count     : 11
    1414//
     
    5151        if ( dimension ) {
    5252                os << " with dimension of ";
    53                 dimension->print( os, 0 );
     53                dimension->print( os, indent );
    5454        } // if
    5555}
  • src/SynTree/Expression.cc

    r7b3f66b rd668182  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed May 04 12:17:51 2016
     12// Last Modified On : Fri May 13 13:23:11 2016
    1313// Update Count     : 40
    1414//
     
    7575        constant.print( os );
    7676        Expression::print( os, indent );
    77         os << std::endl;
    7877}
    7978
     
    325324        os << ", from aggregate: ";
    326325        if (agg != 0) {
     326                os << std::string( indent + 2, ' ' );
    327327                agg->print(os, indent + 2);
    328328        }
     
    360360        os << std::string( indent, ' ' ) << "from aggregate: " << std::endl;
    361361        if (agg != 0) {
     362                os << std::string( indent + 2, ' ' );
    362363                agg->print(os, indent + 2);
    363364        }
     
    381382void UntypedExpr::print( std::ostream &os, int indent ) const {
    382383        os << "Applying untyped: " << std::endl;
    383         os << std::string( indent+4, ' ' );
    384         function->print(os, indent + 4);
     384        os << std::string( indent+2, ' ' );
     385        function->print(os, indent + 2);
    385386        os << std::string( indent, ' ' ) << "...to: " << std::endl;
    386         printAll(args, os, indent + 4);
     387        printAll(args, os, indent + 2);
    387388        Expression::print( os, indent );
    388389}
  • src/SynTree/Initializer.cc

    r7b3f66b rd668182  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Apr 26 15:51:35 2016
     12// Last Modified On : Fri May 13 13:23:03 2016
    1313// Update Count     : 28
    1414//
     
    4949
    5050        if ( ! designators.empty() ) {
    51                 os << std::endl << std::string(indent + 2, ' ' ) << "designated by: "   << std::endl;
     51                os << std::endl << std::string(indent + 2, ' ' ) << "designated by: " << std::endl;
    5252                for ( std::list < Expression * >::iterator i = designators.begin(); i != designators.end(); i++ ) {
     53                        os << std::string(indent + 4, ' ' );
    5354                        ( *i )->print(os, indent + 4 );
    5455                }
  • src/SynTree/ObjectDecl.cc

    r7b3f66b rd668182  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed May 04 12:18:28 2016
     12// Last Modified On : Fri May 13 13:23:32 2016
    1313// Update Count     : 30
    1414//
     
    5757
    5858        if ( init ) {
    59                 os << std::string(indent, ' ');
    6059                os << " with initializer ";
    6160                init->print( os, indent );
    62                 os << std::string(indent, ' ') << "maybeConstructed? " << init->get_maybeConstructed();
     61                os << std::endl << std::string(indent, ' ');
     62                os << "maybeConstructed? " << init->get_maybeConstructed();
    6363        } // if
    6464
  • src/SynTree/Statement.cc

    r7b3f66b rd668182  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Apr 28 13:34:32 2016
     12// Last Modified On : Thu May 12 13:33:18 2016
    1313// Update Count     : 54
    1414//
     
    4343
    4444void ExprStmt::print( std::ostream &os, int indent ) const {
    45         os << "Expression Statement:" << endl << std::string( indent, ' ' );
     45        os << "Expression Statement:" << endl << std::string( indent + 2, ' ' );
    4646        expr->print( os, indent + 2 );
    4747}
     
    290290        os << string( indent + 2, ' ' ) << "initialization: \n";
    291291        for ( std::list<Statement *>::const_iterator it = initialization.begin(); it != initialization.end(); ++it ) {
     292                os << string( indent + 4, ' ' );
    292293                (*it)->print( os, indent + 4 );
    293294        }
    294295
    295296        os << "\n" << string( indent + 2, ' ' ) << "condition: \n";
    296         if ( condition != 0 )
     297        if ( condition != 0 ) {
     298                os << string( indent + 4, ' ' );
    297299                condition->print( os, indent + 4 );
     300        }
    298301
    299302        os << "\n" << string( indent + 2, ' ' ) << "increment: \n";
    300         if ( increment != 0 )
     303        if ( increment != 0 ) {
     304                os << string( indent + 4, ' ' );
    301305                increment->print( os, indent + 4 );
     306        }
    302307
    303308        os << "\n" << string( indent + 2, ' ' ) << "statement block: \n";
    304         if ( body != 0 )
     309        if ( body != 0 ) {
     310                os << string( indent + 4, ' ' );
    305311                body->print( os, indent + 4 );
     312        }
    306313
    307314        os << endl;
Note: See TracChangeset for help on using the changeset viewer.