Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    raf5c204a r4b0f997  
    288288}
    289289
     290// CastExpr *CastExpr::clone() const { return 0; }
     291
    290292void CastExpr::print( std::ostream &os, int indent ) const {
    291293        os << "Cast of:" << std::endl << std::string( indent+2, ' ' );
     
    353355}
    354356
     357//// is this right? It's cloning the member, but the member is a declaration so probably shouldn't be cloned...
    355358MemberExpr::MemberExpr( const MemberExpr &other ) :
    356359                Expression( other ), member( other.member ), aggregate( maybeClone( other.aggregate ) ) {
     
    358361
    359362MemberExpr::~MemberExpr() {
    360         // don't delete the member declaration, since it points somewhere else in the tree
     363        // delete member;
    361364        delete aggregate;
    362365}
     
    588591}
    589592
     593UntypedValofExpr::UntypedValofExpr( const UntypedValofExpr & other ) : Expression( other ), body ( maybeClone( other.body ) ) {}
     594
     595UntypedValofExpr::~UntypedValofExpr() { delete body; }
     596
     597void 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
    590603RangeExpr::RangeExpr( Expression *low, Expression *high ) : low( low ), high( high ) {}
    591604RangeExpr::RangeExpr( const RangeExpr &other ) : Expression( other ), low( other.low->clone() ), high( other.high->clone() ) {}
Note: See TracChangeset for help on using the changeset viewer.