Ignore:
Timestamp:
Jun 5, 2015, 8:12:32 AM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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, string, with_gc
Children:
a65d92e
Parents:
cf0941d
Message:

remove all carriage returns from printing, work on regression testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    rcf0941d r44b5ca0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun  4 21:42:55 2015
    13 // Update Count     : 10
     12// Last Modified On : Fri Jun  5 07:51:09 2015
     13// Update Count     : 11
    1414//
    1515
     
    9393
    9494void VariableExpr::print( std::ostream &os, int indent ) const {
    95         os << std::string(indent, ' ') << "Variable Expression: ";
     95        os << std::string( indent, ' ' ) << "Variable Expression: ";
    9696
    9797        Declaration *decl = get_var();
     
    122122
    123123void SizeofExpr::print( std::ostream &os, int indent) const {
    124         os << std::string(indent, ' ') << "Sizeof Expression on: ";
     124        os << std::string( indent, ' ' ) << "Sizeof Expression on: ";
    125125
    126126        if (isType)
     
    152152
    153153void AttrExpr::print( std::ostream &os, int indent) const {
    154         os << std::string(indent, ' ') << "Attr ";
     154        os << std::string( indent, ' ' ) << "Attr ";
    155155        attr->print( os, indent + 2 );
    156156        if ( isType || expr ) {
     
    184184
    185185void CastExpr::print( std::ostream &os, int indent ) const {
    186         os << std::string(indent, ' ') << "Cast of:" << std::endl;
     186        os << std::string( indent, ' ' ) << "Cast of:" << std::endl;
    187187        arg->print(os, indent+2);
    188         os << std::endl << std::string(indent, ' ') << "to:" << std::endl;
     188        os << std::endl << std::string( indent, ' ' ) << "to:" << std::endl;
    189189        if ( results.empty() ) {
    190                 os << std::string(indent+2, ' ') << "nothing" << std::endl;
     190                os << std::string( indent+2, ' ' ) << "nothing" << std::endl;
    191191        } else {
    192192                printAll(results, os, indent+2);
     
    207207
    208208void UntypedMemberExpr::print( std::ostream &os, int indent ) const {
    209         os << std::string(indent, ' ') << "Member Expression, with field: " << get_member();
     209        os << std::string( indent, ' ' ) << "Member Expression, with field: " << get_member();
    210210
    211211        Expression *agg = get_aggregate();
    212         os << std::string(indent, ' ') << "from aggregate: ";
     212        os << std::string( indent, ' ' ) << "from aggregate: ";
    213213        if (agg != 0) agg->print(os, indent + 2);
    214214        Expression::print( os, indent );
     
    234234
    235235void MemberExpr::print( std::ostream &os, int indent ) const {
    236         os << std::string(indent, ' ') << "Member Expression, with field: " << std::endl;
     236        os << std::string( indent, ' ' ) << "Member Expression, with field: " << std::endl;
    237237
    238238        assert( member );
    239         os << std::string(indent + 2, ' ');
     239        os << std::string( indent + 2, ' ' );
    240240        member->print( os, indent + 2 );
    241241        os << std::endl;
    242242
    243243        Expression *agg = get_aggregate();
    244         os << std::string(indent, ' ') << "from aggregate: " << std::endl;
     244        os << std::string( indent, ' ' ) << "from aggregate: " << std::endl;
    245245        if (agg != 0) agg->print(os, indent + 2);
    246246        Expression::print( os, indent );
     
    261261
    262262void UntypedExpr::print( std::ostream &os, int indent ) const {
    263         os << std::string(indent, ' ') << "Applying untyped: " << std::endl;
     263        os << std::string( indent, ' ' ) << "Applying untyped: " << std::endl;
    264264        function->print(os, indent + 4);
    265         os << "\r" << std::string(indent, ' ') << "...to: " << std::endl;
     265        os << std::string( indent, ' ' ) << "...to: " << std::endl;
    266266        printArgs(os, indent + 4);
    267267        Expression::print( os, indent );
     
    282282
    283283void NameExpr::print( std::ostream &os, int indent ) const {
    284         os << std::string(indent, ' ') << "Name: " << get_name() << std::endl;
     284        os << std::string( indent, ' ' ) << "Name: " << get_name() << std::endl;
    285285        Expression::print( os, indent );
    286286}
     
    301301
    302302void LogicalExpr::print( std::ostream &os, int indent )const {
    303         os << std::string(indent, ' ') << "Short-circuited operation (" << (isAnd?"and":"or") << ") on: ";
     303        os << std::string( indent, ' ' ) << "Short-circuited operation (" << (isAnd?"and":"or") << ") on: ";
    304304        arg1->print(os);
    305305        os << " and ";
     
    323323
    324324void ConditionalExpr::print( std::ostream &os, int indent ) const {
    325         os << std::string(indent, ' ') << "Conditional expression on: " << std::endl;
     325        os << std::string( indent, ' ' ) << "Conditional expression on: " << std::endl;
    326326        arg1->print( os, indent+2 );
    327         os << std::string(indent, ' ') << "First alternative:" << std::endl;
     327        os << std::string( indent, ' ' ) << "First alternative:" << std::endl;
    328328        arg2->print( os, indent+2 );
    329         os << std::string(indent, ' ') << "Second alternative:" << std::endl;
     329        os << std::string( indent, ' ' ) << "Second alternative:" << std::endl;
    330330        arg3->print( os, indent+2 );
    331331        os << std::endl;
     
    334334
    335335void UntypedValofExpr::print( std::ostream &os, int indent ) const {
    336         os << std::string(indent, ' ') << "Valof Expression: " << std::endl;
     336        os << std::string( indent, ' ' ) << "Valof Expression: " << std::endl;
    337337        if ( get_body() != 0 )
    338338                get_body()->print( os, indent + 2 );
Note: See TracChangeset for help on using the changeset viewer.