Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    rb6fe7e6 r3906301  
    595595};
    596596
    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'
     598class 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;
    613613};
    614614
     
    635635};
    636636
    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'
    656637class RangeExpr : public Expression {
    657638  public:
Note: See TracChangeset for help on using the changeset viewer.