Ignore:
Timestamp:
Sep 24, 2016, 12:19:33 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
3b5e3aa
Parents:
2298f728 (diff), 7ae930a (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.
Message:

fix conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r2298f728 r9c23f31  
    595595};
    596596
     597/// ConstructorExpr represents the use of a constructor in an expression context, e.g. int * x = malloc() { 5 };
     598class ConstructorExpr : public Expression {
     599public:
     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;
     611private:
     612        Expression * callExpr;
     613};
     614
     615/// CompoundLiteralExpr represents a C99 'compound literal'
     616class 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
    597637/// ValofExpr represents a GCC 'lambda expression'
    598638class UntypedValofExpr : public Expression {
     
    613653};
    614654
    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 
     655/// RangeExpr represents a range e.g. '3 ... 5' or '1~10'
    637656class RangeExpr : public Expression {
    638657  public:
Note: See TracChangeset for help on using the changeset viewer.