Changes in src/SynTree/Expression.h [afc1045:630a82a]
- File:
-
- 1 edited
-
src/SynTree/Expression.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
rafc1045 r630a82a 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Dec 09 14:10:21 201513 // Update Count : 1911 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 8 17:18:06 2016 13 // Update Count : 21 14 14 // 15 15 … … 362 362 }; 363 363 364 /// Expression representing a pack of field-offsets for a generic type365 class OffsetPackExpr : public Expression {366 public:367 OffsetPackExpr( StructInstType *type_, Expression *aname_ = 0 );368 OffsetPackExpr( const OffsetPackExpr &other );369 virtual ~OffsetPackExpr();370 371 StructInstType *get_type() const { return type; }372 void set_type( StructInstType *newValue ) { type = newValue; }373 374 virtual OffsetPackExpr *clone() const { return new OffsetPackExpr( *this ); }375 virtual void accept( Visitor &v ) { v.visit( this ); }376 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }377 378 virtual void print( std::ostream &os, int indent = 0 ) const;379 380 private:381 StructInstType *type;382 };383 384 364 /// AttrExpr represents an @attribute expression (like sizeof, but user-defined) 385 365 class AttrExpr : public Expression { … … 577 557 }; 578 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 }; 580 579 581 std::ostream & operator<<( std::ostream & out, Expression * expr ); 580 582
Note:
See TracChangeset
for help on using the changeset viewer.