Ignore:
Timestamp:
Apr 26, 2016, 12:58:14 PM (8 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:
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.
Message:

Merge branch 'fix-tree-printing' into ctor

Conflicts:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r5382492 r668edd6b  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri Apr 22 16:20:43 2016
     12// Last Modified On : Tue Apr 26 12:58:05 2016
    1313// Update Count     : 40
    1414//
     
    9595
    9696void VariableExpr::print( std::ostream &os, int indent ) const {
    97         os << std::string( indent, ' ' ) << "Variable Expression: ";
     97        os << "Variable Expression: ";
    9898
    9999        Declaration *decl = get_var();
     
    124124
    125125void SizeofExpr::print( std::ostream &os, int indent) const {
    126         os << std::string( indent, ' ' ) << "Sizeof Expression on: ";
     126        os << "Sizeof Expression on: ";
    127127
    128128        if (isType)
     
    297297
    298298void 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, ' ' );
    300300        arg->print(os, indent+2);
    301301        os << std::endl << std::string( indent, ' ' ) << "to:" << std::endl;
     
    320320
    321321void 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();
    323323
    324324        Expression *agg = get_aggregate();
    325325        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, ' ' );
    327331        Expression::print( os, indent );
    328332}
     
    347351
    348352void 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;
    350354
    351355        assert( member );
     
    356360        Expression *agg = get_aggregate();
    357361        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, ' ' );
    359367        Expression::print( os, indent );
    360368}
     
    374382
    375383void 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, ' ' );
    377386        function->print(os, indent + 4);
    378387        os << std::string( indent, ' ' ) << "...to: " << std::endl;
     388        os << std::string( indent, ' ' );
    379389        printArgs(os, indent + 4);
    380390        Expression::print( os, indent );
     
    395405
    396406void 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;
    398408        Expression::print( os, indent );
    399409}
Note: See TracChangeset for help on using the changeset viewer.