Changes in src/SynTree/Expression.h [630a82a:e04ef3a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r630a82a re04ef3a 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 8 17:18:06201613 // Update Count : 2 112 // Last Modified On : Wed Jun 8 17:05:30 2016 13 // Update Count : 22 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 … … 37 38 Expression *get_argName() const { return argName; } 38 39 void set_argName( Expression *name ) { argName = name; } 40 bool get_extension() const { return extension; } 41 void set_extension( bool exten ) { extension = exten; } 39 42 40 43 virtual Expression *clone() const = 0; … … 46 49 TypeSubstitution *env; 47 50 Expression* argName; // if expression is used as an argument, it can be "designated" by this name 51 bool extension = false; 48 52 }; 49 53 … … 362 366 }; 363 367 368 /// Expression representing a pack of field-offsets for a generic type 369 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 364 388 /// AttrExpr represents an @attribute expression (like sizeof, but user-defined) 365 389 class AttrExpr : public Expression { … … 539 563 }; 540 564 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 541 596 /// ValofExpr represents a GCC 'lambda expression' 542 597 class UntypedValofExpr : public Expression {
Note:
See TracChangeset
for help on using the changeset viewer.