Changes in / [5382492:668edd6b]


Ignore:
Location:
src/SynTree
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AddressExpr.cc

    r5382492 r668edd6b  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // AddressExpr.cc -- 
     7// AddressExpr.cc --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 23:54:44 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 16:52:51 2015
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Tue Apr 26 12:35:13 2016
    1313// Update Count     : 6
    1414//
     
    3232
    3333void AddressExpr::print( std::ostream &os, int indent ) const {
    34         os << std::string( indent, ' ' ) << "Address of:" << std::endl;
     34        os << "Address of:" << std::endl;
    3535        if ( arg ) {
    36                 arg->print( os, indent+2 );
     36                os << std::string( indent+2, ' ' );
     37    arg->print( os, indent+2 );
    3738        } // if
    3839}
  • src/SynTree/ApplicationExpr.cc

    r5382492 r668edd6b  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ApplicationExpr.cc.cc -- 
     7// ApplicationExpr.cc.cc --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 07:54:17 2015
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Tue Apr 26 12:41:06 2016
    1313// Update Count     : 4
    1414//
     
    4747        FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() );
    4848        assert( function );
    49        
     49
    5050        for ( std::list< DeclarationWithType* >::const_iterator i = function->get_returnVals().begin(); i != function->get_returnVals().end(); ++i ) {
    5151                get_results().push_back( (*i)->get_type()->clone() );
     
    6464
    6565void ApplicationExpr::print( std::ostream &os, int indent ) const {
    66         os << std::string( indent, ' ' ) << "Application of" << std::endl;
     66        os << "Application of" << std::endl << std::string(indent, ' ');
    6767        function->print( os, indent+2 );
    6868        if ( ! args.empty() ) {
  • 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}
  • src/SynTree/Initializer.cc

    r5382492 r668edd6b  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 11 17:36:10 2016
     12// Last Modified On : Tue Apr 26 12:57:34 2016
    1313// Update Count     : 28
    1414//
  • src/SynTree/ObjectDecl.cc

    r5382492 r668edd6b  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Feb 09 13:21:03 2016
     12// Last Modified On : Tue Apr 26 12:56:27 2016
    1313// Update Count     : 30
    1414//
  • src/SynTree/Statement.cc

    r5382492 r668edd6b  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Dec 09 14:09:34 2015
     12// Last Modified On : Tue Apr 26 12:33:33 2016
    1313// Update Count     : 54
    1414//
     
    4343
    4444void ExprStmt::print( std::ostream &os, int indent ) const {
    45         os << string( indent, ' ' ) << "Expression Statement:" << endl;
     45        os << "Expression Statement:" << endl << std::string( indent, ' ' );
    4646        expr->print( os, indent + 2 );
    4747}
     
    110110
    111111void ReturnStmt::print( std::ostream &os, int indent ) const {
    112         os << std::string( indent, ' ' ) << string ( isThrow? "Throw":"Return" ) << " Statement, returning: ";
    113         if ( expr != 0 ) expr->print( os );
     112        os << string ( isThrow? "Throw":"Return" ) << " Statement, returning: ";
     113        if ( expr != 0 ) {
     114                os << endl << string( indent+2, ' ' );
     115                expr->print( os, indent + 2 );
     116        }
    114117        os << endl;
    115118}
     
    124127
    125128void IfStmt::print( std::ostream &os, int indent ) const {
    126         os << string( indent, ' ' ) << "If on condition: " << endl ;
     129        os << "If on condition: " << endl ;
    127130        condition->print( os, indent + 4 );
    128131
     
    153156
    154157void SwitchStmt::print( std::ostream &os, int indent ) const {
    155         os << string( indent, ' ' ) << "Switch on condition: ";
     158        os << "Switch on condition: ";
    156159        condition->print( os );
    157160        os << endl;
     
    218221
    219222void ChooseStmt::print( std::ostream &os, int indent ) const {
    220         os << string( indent, ' ' ) << "Choose on condition: ";
     223        os << "Choose on condition: ";
    221224        condition->print( os );
    222225        os << endl;
     
    247250
    248251void WhileStmt::print( std::ostream &os, int indent ) const {
    249         os << string( indent, ' ' ) << "While on condition: " << endl ;
     252        os << "While on condition: " << endl ;
    250253        condition->print( os, indent + 4 );
    251254
     
    273276
    274277void ForStmt::print( std::ostream &os, int indent ) const {
    275         os << string( indent, ' ' ) << "Labels: {";
     278        os << "Labels: {";
    276279        for ( std::list<Label>::const_iterator it = get_labels().begin(); it != get_labels().end(); ++it) {
    277280                os << *it << ",";
     
    314317
    315318void TryStmt::print( std::ostream &os, int indent ) const {
    316         os << string( indent, ' ' ) << "Try Statement" << endl;
     319        os << "Try Statement" << endl;
    317320        os << string( indent + 2, ' ' ) << "with block: " << endl;
    318321        block->print( os, indent + 4 );
     
    378381
    379382void NullStmt::print( std::ostream &os, int indent ) const {
    380         os << string( indent, ' ' ) << "Null Statement" << endl ;
     383        os << "Null Statement" << endl ;
    381384}
    382385
Note: See TracChangeset for help on using the changeset viewer.