Changes in src/SynTree/TupleExpr.cc [bf4b4cf:e3e16bc]
- File:
-
- 1 edited
-
src/SynTree/TupleExpr.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/TupleExpr.cc
rbf4b4cf re3e16bc 28 28 #include "Type.h" // for TupleType, Type 29 29 30 UntypedTupleExpr::UntypedTupleExpr( const std::list< Expression * > & exprs ) : Expression(), exprs( exprs ) {30 UntypedTupleExpr::UntypedTupleExpr( const std::list< Expression * > & exprs, Expression *_aname ) : Expression( _aname ), exprs( exprs ) { 31 31 } 32 32 … … 39 39 } 40 40 41 void UntypedTupleExpr::print( std::ostream &os, Indenterindent ) const {41 void UntypedTupleExpr::print( std::ostream &os, int indent ) const { 42 42 os << "Untyped Tuple:" << std::endl; 43 printAll( exprs, os, indent+ 1);43 printAll( exprs, os, indent+2 ); 44 44 Expression::print( os, indent ); 45 45 } 46 46 47 TupleExpr::TupleExpr( const std::list< Expression * > & exprs ) : Expression(), exprs( exprs ) {47 TupleExpr::TupleExpr( const std::list< Expression * > & exprs, Expression *_aname ) : Expression( _aname ), exprs( exprs ) { 48 48 set_result( Tuples::makeTupleType( exprs ) ); 49 49 } … … 57 57 } 58 58 59 void TupleExpr::print( std::ostream &os, Indenterindent ) const {59 void TupleExpr::print( std::ostream &os, int indent ) const { 60 60 os << "Tuple:" << std::endl; 61 printAll( exprs, os, indent+ 1);61 printAll( exprs, os, indent+2 ); 62 62 Expression::print( os, indent ); 63 63 } … … 78 78 } 79 79 80 void TupleIndexExpr::print( std::ostream &os, Indenterindent ) const {80 void TupleIndexExpr::print( std::ostream &os, int indent ) const { 81 81 os << "Tuple Index Expression, with tuple:" << std::endl; 82 os << indent+1;83 tuple->print( os, indent+ 1);84 os << indent+1<< "with index: " << index << 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; 85 85 Expression::print( os, indent ); 86 86 } 87 87 88 TupleAssignExpr::TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls ) : Expression() {88 TupleAssignExpr::TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls, Expression * _aname ) : Expression( _aname ) { 89 89 // convert internally into a StmtExpr which contains the declarations and produces the tuple of the assignments 90 90 set_result( Tuples::makeTupleType( assigns ) ); … … 109 109 } 110 110 111 void TupleAssignExpr::print( std::ostream &os, Indenterindent ) const {111 void TupleAssignExpr::print( std::ostream &os, int indent ) const { 112 112 os << "Tuple Assignment Expression, with stmt expr:" << std::endl; 113 os << indent+1;114 stmtExpr->print( os, indent+ 1);113 os << std::string( indent+2, ' ' ); 114 stmtExpr->print( os, indent+4 ); 115 115 Expression::print( os, indent ); 116 116 }
Note:
See TracChangeset
for help on using the changeset viewer.