Changes in src/SynTree/Expression.h [630a82a:db4ecc5]
- File:
-
- 1 edited
-
src/SynTree/Expression.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r630a82a rdb4ecc5 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Apr 8 17:18:06201613 // Update Count : 2111 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Apr 14 12:04:58 2016 13 // Update Count : 19 14 14 // 15 15 … … 22 22 #include "Mutator.h" 23 23 #include "Constant.h" 24 #include "Common/UniqueName.h" 24 25 25 26 /// Expression is the root type for all expressions … … 539 540 }; 540 541 542 /// ImplicitCopyCtorExpr represents the application of a function to a set of parameters, 543 /// along with a set of copy constructor calls, one for each argument. 544 class ImplicitCopyCtorExpr : public Expression { 545 public: 546 ImplicitCopyCtorExpr( ApplicationExpr * callExpr ); 547 ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other ); 548 virtual ~ImplicitCopyCtorExpr(); 549 550 ApplicationExpr *get_callExpr() const { return callExpr; } 551 void set_callExpr( ApplicationExpr *newValue ) { callExpr = newValue; } 552 553 std::list< Expression * > & get_copyCtors() { return copyCtors; } 554 void set_copyCtors( std::list< Expression * > newValue ) { copyCtors = newValue; } 555 556 std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; } 557 void set_tempDecls( std::list< ObjectDecl * > newValue ) { tempDecls = newValue; } 558 559 std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; } 560 void set_returnDecls( std::list< ObjectDecl * > newValue ) { returnDecls = newValue; } 561 562 std::list< Expression * > & get_dtors() { return dtors; } 563 void set_dtors( std::list< Expression * > newValue ) { dtors = newValue; } 564 565 virtual ImplicitCopyCtorExpr *clone() const { return new ImplicitCopyCtorExpr( *this ); } 566 virtual void accept( Visitor &v ) { v.visit( this ); } 567 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 568 virtual void print( std::ostream &os, int indent = 0 ) const; 569 private: 570 ApplicationExpr * callExpr; 571 std::list< Expression * > copyCtors; 572 std::list< ObjectDecl * > tempDecls; 573 std::list< ObjectDecl * > returnDecls; 574 std::list< Expression * > dtors; 575 }; 576 541 577 /// ValofExpr represents a GCC 'lambda expression' 542 578 class UntypedValofExpr : public Expression { … … 555 591 private: 556 592 Statement *body; 557 };558 559 /// CompoundLiteralExpr represents a C99 'compound literal'560 class CompoundLiteralExpr : public Expression {561 public:562 CompoundLiteralExpr( Type * type, Initializer * initializer );563 CompoundLiteralExpr( const CompoundLiteralExpr &other );564 ~CompoundLiteralExpr();565 566 Type * get_type() const { return type; }567 void set_type( Type * t ) { type = t; }568 569 Initializer * get_initializer() const { return initializer; }570 void set_initializer( Initializer * i ) { initializer = i; }571 572 virtual CompoundLiteralExpr *clone() const { return new CompoundLiteralExpr( *this ); }573 virtual void accept( Visitor &v ) { v.visit( this ); }574 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }575 virtual void print( std::ostream &os, int indent = 0 ) const;576 private:577 Type * type;578 Initializer * initializer;579 593 }; 580 594
Note:
See TracChangeset
for help on using the changeset viewer.