Changeset 3c13c03 for src/SynTree/Expression.h
- Timestamp:
- Sep 17, 2016, 8:27:51 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 8c49c0e
- Parents:
- 12bc63a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r12bc63a r3c13c03 639 639 class TupleExpr : public Expression { 640 640 public: 641 TupleExpr( Expression *_aname = nullptr );641 TupleExpr( const std::list< Expression * > & exprs = std::list< Expression * >(), Expression *_aname = nullptr ); 642 642 TupleExpr( const TupleExpr &other ); 643 643 virtual ~TupleExpr(); … … 733 733 }; 734 734 735 class UniqueExpr : public Expression { 736 public: 737 UniqueExpr( Expression * expr ); 738 UniqueExpr( const UniqueExpr & other ); 739 ~UniqueExpr(); 740 741 Expression * get_expr() const { return *expr; } 742 UniqueExpr * set_expr( Expression * newValue ) { *expr = newValue; return this; } 743 744 virtual UniqueExpr *clone() const { return new UniqueExpr( *this ); } 745 virtual void accept( Visitor &v ) { v.visit( this ); } 746 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 747 virtual void print( std::ostream &os, int indent = 0 ) const; 748 private: 749 std::shared_ptr< Expression * > expr; 750 }; 751 735 752 std::ostream & operator<<( std::ostream & out, const Expression * expr ); 736 753
Note: See TracChangeset
for help on using the changeset viewer.