Changeset 8688ce1 for src/SynTree/Expression.h
- Timestamp:
- Aug 4, 2016, 12:29:54 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:
- 76e8c55
- Parents:
- e80ebe5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
re80ebe5 r8688ce1 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 4 14:45:32201613 // Update Count : 2 312 // Last Modified On : Wed Aug 3 17:08:44 2016 13 // Update Count : 27 14 14 // 15 15 … … 18 18 19 19 #include <map> 20 #include <memory> 20 21 #include "SynTree.h" 21 22 #include "Visitor.h" … … 634 635 }; 635 636 637 class RangeExpr : public Expression { 638 public: 639 RangeExpr( ConstantExpr *low, ConstantExpr *high ); 640 RangeExpr( const RangeExpr &other ); 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; } 646 647 virtual RangeExpr *clone() const { return new RangeExpr( *this ); } 648 virtual void accept( Visitor &v ) { v.visit( this ); } 649 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 650 virtual void print( std::ostream &os, int indent = 0 ) const; 651 private: 652 std::unique_ptr<ConstantExpr> low, high; 653 }; 654 636 655 std::ostream & operator<<( std::ostream & out, Expression * expr ); 637 656
Note: See TracChangeset
for help on using the changeset viewer.