Changes in src/SynTree/Expression.h [e04ef3a:630a82a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
re04ef3a r630a82a 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 8 17:05:30201613 // Update Count : 2 212 // Last Modified On : Fri Apr 8 17:18:06 2016 13 // Update Count : 21 14 14 // 15 15 … … 22 22 #include "Mutator.h" 23 23 #include "Constant.h" 24 #include "Common/UniqueName.h"25 24 26 25 /// Expression is the root type for all expressions … … 38 37 Expression *get_argName() const { return argName; } 39 38 void set_argName( Expression *name ) { argName = name; } 40 bool get_extension() const { return extension; }41 void set_extension( bool exten ) { extension = exten; }42 39 43 40 virtual Expression *clone() const = 0; … … 49 46 TypeSubstitution *env; 50 47 Expression* argName; // if expression is used as an argument, it can be "designated" by this name 51 bool extension = false;52 48 }; 53 49 … … 366 362 }; 367 363 368 /// Expression representing a pack of field-offsets for a generic type369 class OffsetPackExpr : public Expression {370 public:371 OffsetPackExpr( StructInstType *type_, Expression *aname_ = 0 );372 OffsetPackExpr( const OffsetPackExpr &other );373 virtual ~OffsetPackExpr();374 375 StructInstType *get_type() const { return type; }376 void set_type( StructInstType *newValue ) { type = newValue; }377 378 virtual OffsetPackExpr *clone() const { return new OffsetPackExpr( *this ); }379 virtual void accept( Visitor &v ) { v.visit( this ); }380 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }381 382 virtual void print( std::ostream &os, int indent = 0 ) const;383 384 private:385 StructInstType *type;386 };387 388 364 /// AttrExpr represents an @attribute expression (like sizeof, but user-defined) 389 365 class AttrExpr : public Expression { … … 563 539 }; 564 540 565 /// ImplicitCopyCtorExpr represents the application of a function to a set of parameters,566 /// along with a set of copy constructor calls, one for each argument.567 class ImplicitCopyCtorExpr : public Expression {568 public:569 ImplicitCopyCtorExpr( ApplicationExpr * callExpr );570 ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other );571 virtual ~ImplicitCopyCtorExpr();572 573 ApplicationExpr *get_callExpr() const { return callExpr; }574 void set_callExpr( ApplicationExpr *newValue ) { callExpr = newValue; }575 576 std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }577 void set_tempDecls( std::list< ObjectDecl * > newValue ) { tempDecls = newValue; }578 579 std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }580 void set_returnDecls( std::list< ObjectDecl * > newValue ) { returnDecls = newValue; }581 582 std::list< Expression * > & get_dtors() { return dtors; }583 void set_dtors( std::list< Expression * > newValue ) { dtors = newValue; }584 585 virtual ImplicitCopyCtorExpr *clone() const { return new ImplicitCopyCtorExpr( *this ); }586 virtual void accept( Visitor &v ) { v.visit( this ); }587 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }588 virtual void print( std::ostream &os, int indent = 0 ) const;589 private:590 ApplicationExpr * callExpr;591 std::list< ObjectDecl * > tempDecls;592 std::list< ObjectDecl * > returnDecls;593 std::list< Expression * > dtors;594 };595 596 541 /// ValofExpr represents a GCC 'lambda expression' 597 542 class UntypedValofExpr : public Expression {
Note:
See TracChangeset
for help on using the changeset viewer.