Changeset 70a06f6 for src/SynTree/Expression.h
- Timestamp:
- Apr 14, 2016, 4:13:10 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 356189a
- Parents:
- db4ecc5 (diff), 37f0da8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
rdb4ecc5 r70a06f6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Apr 14 1 2:04:58201613 // Update Count : 1912 // Last Modified On : Thu Apr 14 15:40:56 2016 13 // Update Count : 21 14 14 // 15 15 … … 363 363 }; 364 364 365 /// Expression representing a pack of field-offsets for a generic type 366 class OffsetPackExpr : public Expression { 367 public: 368 OffsetPackExpr( StructInstType *type_, Expression *aname_ = 0 ); 369 OffsetPackExpr( const OffsetPackExpr &other ); 370 virtual ~OffsetPackExpr(); 371 372 StructInstType *get_type() const { return type; } 373 void set_type( StructInstType *newValue ) { type = newValue; } 374 375 virtual OffsetPackExpr *clone() const { return new OffsetPackExpr( *this ); } 376 virtual void accept( Visitor &v ) { v.visit( this ); } 377 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 378 379 virtual void print( std::ostream &os, int indent = 0 ) const; 380 381 private: 382 StructInstType *type; 383 }; 384 365 385 /// AttrExpr represents an @attribute expression (like sizeof, but user-defined) 366 386 class AttrExpr : public Expression { … … 593 613 }; 594 614 615 /// CompoundLiteralExpr represents a C99 'compound literal' 616 class CompoundLiteralExpr : public Expression { 617 public: 618 CompoundLiteralExpr( Type * type, Initializer * initializer ); 619 CompoundLiteralExpr( const CompoundLiteralExpr &other ); 620 ~CompoundLiteralExpr(); 621 622 Type * get_type() const { return type; } 623 void set_type( Type * t ) { type = t; } 624 625 Initializer * get_initializer() const { return initializer; } 626 void set_initializer( Initializer * i ) { initializer = i; } 627 628 virtual CompoundLiteralExpr *clone() const { return new CompoundLiteralExpr( *this ); } 629 virtual void accept( Visitor &v ) { v.visit( this ); } 630 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 631 virtual void print( std::ostream &os, int indent = 0 ) const; 632 private: 633 Type * type; 634 Initializer * initializer; 635 }; 636 595 637 std::ostream & operator<<( std::ostream & out, Expression * expr ); 596 638
Note: See TracChangeset
for help on using the changeset viewer.