Changes in src/SynTree/Expression.cc [af5c204a:4b0f997]
- File:
-
- 1 edited
-
src/SynTree/Expression.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
raf5c204a r4b0f997 288 288 } 289 289 290 // CastExpr *CastExpr::clone() const { return 0; } 291 290 292 void CastExpr::print( std::ostream &os, int indent ) const { 291 293 os << "Cast of:" << std::endl << std::string( indent+2, ' ' ); … … 353 355 } 354 356 357 //// is this right? It's cloning the member, but the member is a declaration so probably shouldn't be cloned... 355 358 MemberExpr::MemberExpr( const MemberExpr &other ) : 356 359 Expression( other ), member( other.member ), aggregate( maybeClone( other.aggregate ) ) { … … 358 361 359 362 MemberExpr::~MemberExpr() { 360 // d on't delete the member declaration, since it points somewhere else in the tree363 // delete member; 361 364 delete aggregate; 362 365 } … … 588 591 } 589 592 593 UntypedValofExpr::UntypedValofExpr( const UntypedValofExpr & other ) : Expression( other ), body ( maybeClone( other.body ) ) {} 594 595 UntypedValofExpr::~UntypedValofExpr() { delete body; } 596 597 void UntypedValofExpr::print( std::ostream &os, int indent ) const { 598 os << std::string( indent, ' ' ) << "Valof Expression: " << std::endl; 599 if ( get_body() != 0 ) 600 get_body()->print( os, indent + 2 ); 601 } 602 590 603 RangeExpr::RangeExpr( Expression *low, Expression *high ) : low( low ), high( high ) {} 591 604 RangeExpr::RangeExpr( const RangeExpr &other ) : Expression( other ), low( other.low->clone() ), high( other.high->clone() ) {}
Note:
See TracChangeset
for help on using the changeset viewer.