Ignore:
Timestamp:
May 2, 2016, 3:12:59 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:
9243a501, d7903b1
Parents:
89231bc
Message:

fix printing in CommaExpr?, CompoundStmt?, ForStmt?, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r89231bc r60089f4  
    7272
    7373void ConstantExpr::print( std::ostream &os, int indent ) const {
    74         os << std::string( indent, ' ' ) << "constant expression " ;
     74        os << "constant expression " ;
    7575        constant.print( os );
    7676        Expression::print( os, indent );
     
    381381void UntypedExpr::print( std::ostream &os, int indent ) const {
    382382        os << "Applying untyped: " << std::endl;
    383         os << std::string( indent, ' ' );
     383        os << std::string( indent+4, ' ' );
    384384        function->print(os, indent + 4);
    385385        os << std::string( indent, ' ' ) << "...to: " << std::endl;
    386         os << std::string( indent, ' ' );
    387         printArgs(os, indent + 4);
     386        printAll(args, os, indent + 4);
    388387        Expression::print( os, indent );
    389388}
     
    391390void UntypedExpr::printArgs( std::ostream &os, int indent ) const {
    392391        std::list<Expression *>::const_iterator i;
    393         for (i = args.begin(); i != args.end(); i++)
     392        for (i = args.begin(); i != args.end(); i++) {
     393                os << std::string(indent, ' ' );
    394394                (*i)->print(os, indent);
     395        }
    395396}
    396397
Note: See TracChangeset for help on using the changeset viewer.