Changes in src/SynTree/Expression.h [b6fe7e6:3906301]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
rb6fe7e6 r3906301 595 595 }; 596 596 597 /// ConstructorExpr represents the use of a constructor in an expression context, e.g. int * x = malloc() { 5 };598 class ConstructorExpr : public Expression {599 public:600 ConstructorExpr( Expression * callExpr );601 ConstructorExpr( const ConstructorExpr & other );602 ~ConstructorExpr();603 604 Expression *get_ callExpr() const { return callExpr; }605 void set_callExpr( Expression *newValue ) { callExpr = newValue; }606 607 virtual ConstructorExpr *clone() const { return new ConstructorExpr( *this ); }608 virtual void accept( Visitor &v ) { v.visit( this ); } 609 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 610 virtual void print( std::ostream &os, int indent = 0 ) const; 611 private:612 Expression * callExpr;597 /// ValofExpr represents a GCC 'lambda expression' 598 class UntypedValofExpr : public Expression { 599 public: 600 UntypedValofExpr( Statement *_body, Expression *_aname = nullptr ) : Expression( _aname ), body ( _body ) {} 601 UntypedValofExpr( const UntypedValofExpr & other ); 602 virtual ~UntypedValofExpr(); 603 604 Expression *get_value(); 605 Statement *get_body() const { return body; } 606 607 virtual UntypedValofExpr *clone() const { return new UntypedValofExpr( *this ); } 608 virtual void accept( Visitor &v ) { v.visit( this ); } 609 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); } 610 virtual void print( std::ostream &os, int indent = 0 ) const; 611 private: 612 Statement *body; 613 613 }; 614 614 … … 635 635 }; 636 636 637 /// ValofExpr represents a GCC 'lambda expression'638 class UntypedValofExpr : public Expression {639 public:640 UntypedValofExpr( Statement *_body, Expression *_aname = nullptr ) : Expression( _aname ), body ( _body ) {}641 UntypedValofExpr( const UntypedValofExpr & other );642 virtual ~UntypedValofExpr();643 644 Expression *get_value();645 Statement *get_body() const { return body; }646 647 virtual UntypedValofExpr *clone() const { return new UntypedValofExpr( *this ); }648 virtual void accept( Visitor &v ) { v.visit( this ); }649 virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }650 virtual void print( std::ostream &os, int indent = 0 ) const;651 private:652 Statement *body;653 };654 655 /// RangeExpr represents a range e.g. '3 ... 5' or '1~10'656 637 class RangeExpr : public Expression { 657 638 public:
Note: See TracChangeset
for help on using the changeset viewer.