Changeset 6840e7c for src/SynTree/TupleExpr.cc
- Timestamp:
- Oct 19, 2017, 12:01:04 PM (8 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 837ce06
- Parents:
- b96ec83 (diff), a15b72c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/TupleExpr.cc
rb96ec83 r6840e7c 28 28 #include "Type.h" // for TupleType, Type 29 29 30 UntypedTupleExpr::UntypedTupleExpr( const std::list< Expression * > & exprs , Expression *_aname ) : Expression( _aname), exprs( exprs ) {30 UntypedTupleExpr::UntypedTupleExpr( const std::list< Expression * > & exprs ) : Expression(), exprs( exprs ) { 31 31 } 32 32 … … 39 39 } 40 40 41 void UntypedTupleExpr::print( std::ostream &os, intindent ) const {41 void UntypedTupleExpr::print( std::ostream &os, Indenter indent ) const { 42 42 os << "Untyped Tuple:" << std::endl; 43 printAll( exprs, os, indent+ 2);43 printAll( exprs, os, indent+1 ); 44 44 Expression::print( os, indent ); 45 45 } 46 46 47 TupleExpr::TupleExpr( const std::list< Expression * > & exprs , Expression *_aname ) : Expression( _aname), exprs( exprs ) {47 TupleExpr::TupleExpr( const std::list< Expression * > & exprs ) : Expression(), exprs( exprs ) { 48 48 set_result( Tuples::makeTupleType( exprs ) ); 49 49 } … … 57 57 } 58 58 59 void TupleExpr::print( std::ostream &os, intindent ) const {59 void TupleExpr::print( std::ostream &os, Indenter indent ) const { 60 60 os << "Tuple:" << std::endl; 61 printAll( exprs, os, indent+ 2);61 printAll( exprs, os, indent+1 ); 62 62 Expression::print( os, indent ); 63 63 } … … 78 78 } 79 79 80 void TupleIndexExpr::print( std::ostream &os, intindent ) const {80 void TupleIndexExpr::print( std::ostream &os, Indenter indent ) const { 81 81 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; 85 85 Expression::print( os, indent ); 86 86 } 87 87 88 TupleAssignExpr::TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls , Expression * _aname ) : Expression( _aname) {88 TupleAssignExpr::TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls ) : Expression() { 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, intindent ) const {111 void TupleAssignExpr::print( std::ostream &os, Indenter indent ) const { 112 112 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 ); 115 115 Expression::print( os, indent ); 116 116 }
Note:
See TracChangeset
for help on using the changeset viewer.