Changeset d9e2280 for src/SynTree
- Timestamp:
- Aug 5, 2016, 3:56:24 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 35f9114
- Parents:
- 71a3593
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
r71a3593 rd9e2280 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 3 17:06:51201613 // Update Count : 4 512 // Last Modified On : Fri Aug 5 14:23:56 2016 13 // Update Count : 49 14 14 // 15 15 … … 529 529 } 530 530 531 RangeExpr::RangeExpr( ConstantExpr *low, ConstantExpr*high ) : low( low ), high( high ) {}531 RangeExpr::RangeExpr( Expression *low, Expression *high ) : low( low ), high( high ) {} 532 532 RangeExpr::RangeExpr( const RangeExpr &other ) : low( other.low->clone() ), high( other.high->clone() ) {} 533 533 void RangeExpr::print( std::ostream &os, int indent ) const { -
src/SynTree/Expression.h
r71a3593 rd9e2280 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 5 1 0:26:07201613 // Update Count : 2812 // Last Modified On : Fri Aug 5 14:23:58 2016 13 // Update Count : 32 14 14 // 15 15 … … 637 637 class RangeExpr : public Expression { 638 638 public: 639 RangeExpr( ConstantExpr *low, ConstantExpr*high );639 RangeExpr( Expression *low, Expression *high ); 640 640 RangeExpr( const RangeExpr &other ); 641 641 642 ConstantExpr * get_low() const { return low.get(); }643 ConstantExpr * get_high() const { return high.get(); }644 RangeExpr * set_low( ConstantExpr *low ) { RangeExpr::low.reset( low ); return this; }645 RangeExpr * set_high( ConstantExpr *high ) { RangeExpr::high.reset( high ); return this; }642 Expression * get_low() const { return low; } 643 Expression * get_high() const { return high; } 644 RangeExpr * set_low( Expression *low ) { RangeExpr::low = low; return this; } 645 RangeExpr * set_high( Expression *high ) { RangeExpr::high = high; return this; } 646 646 647 647 virtual RangeExpr *clone() const { return new RangeExpr( *this ); } … … 650 650 virtual void print( std::ostream &os, int indent = 0 ) const; 651 651 private: 652 std::unique_ptr<ConstantExpr> low,high;652 Expression *low, *high; 653 653 }; 654 654
Note: See TracChangeset
for help on using the changeset viewer.