Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/TupleExpr.cc

    re3e16bc rbf4b4cf  
    2828#include "Type.h"               // for TupleType, Type
    2929
    30 UntypedTupleExpr::UntypedTupleExpr( const std::list< Expression * > & exprs, Expression *_aname ) : Expression( _aname ), exprs( exprs ) {
     30UntypedTupleExpr::UntypedTupleExpr( const std::list< Expression * > & exprs ) : Expression(), exprs( exprs ) {
    3131}
    3232
     
    3939}
    4040
    41 void UntypedTupleExpr::print( std::ostream &os, int indent ) const {
     41void UntypedTupleExpr::print( std::ostream &os, Indenter indent ) const {
    4242        os << "Untyped Tuple:" << std::endl;
    43         printAll( exprs, os, indent+2 );
     43        printAll( exprs, os, indent+1 );
    4444        Expression::print( os, indent );
    4545}
    4646
    47 TupleExpr::TupleExpr( const std::list< Expression * > & exprs, Expression *_aname ) : Expression( _aname ), exprs( exprs ) {
     47TupleExpr::TupleExpr( const std::list< Expression * > & exprs ) : Expression(), exprs( exprs ) {
    4848        set_result( Tuples::makeTupleType( exprs ) );
    4949}
     
    5757}
    5858
    59 void TupleExpr::print( std::ostream &os, int indent ) const {
     59void TupleExpr::print( std::ostream &os, Indenter indent ) const {
    6060        os << "Tuple:" << std::endl;
    61         printAll( exprs, os, indent+2 );
     61        printAll( exprs, os, indent+1 );
    6262        Expression::print( os, indent );
    6363}
     
    7878}
    7979
    80 void TupleIndexExpr::print( std::ostream &os, int indent ) const {
     80void TupleIndexExpr::print( std::ostream &os, Indenter indent ) const {
    8181        os << "Tuple Index Expression, with tuple:" << std::endl;
    82         os << std::string( indent+2, ' ' );
    83         tuple->print( os, indent+2 );
    84         os << std::string( indent+2, ' ' ) << "with index: " << index << std::endl;
     82        os << indent+1;
     83        tuple->print( os, indent+1 );
     84        os << indent+1 << "with index: " << index << std::endl;
    8585        Expression::print( os, indent );
    8686}
    8787
    88 TupleAssignExpr::TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls, Expression * _aname ) : Expression( _aname ) {
     88TupleAssignExpr::TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls ) : Expression() {
    8989        // convert internally into a StmtExpr which contains the declarations and produces the tuple of the assignments
    9090        set_result( Tuples::makeTupleType( assigns ) );
     
    109109}
    110110
    111 void TupleAssignExpr::print( std::ostream &os, int indent ) const {
     111void TupleAssignExpr::print( std::ostream &os, Indenter indent ) const {
    112112        os << "Tuple Assignment Expression, with stmt expr:" << std::endl;
    113         os << std::string( indent+2, ' ' );
    114         stmtExpr->print( os, indent+4 );
     113        os << indent+1;
     114        stmtExpr->print( os, indent+1 );
    115115        Expression::print( os, indent );
    116116}
Note: See TracChangeset for help on using the changeset viewer.