Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    rdb4ecc5 r630a82a  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Apr 14 12:04:58 2016
    13 // Update Count     : 19
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Apr  8 17:18:06 2016
     13// Update Count     : 21
    1414//
    1515
     
    2222#include "Mutator.h"
    2323#include "Constant.h"
    24 #include "Common/UniqueName.h"
    2524
    2625/// Expression is the root type for all expressions
     
    540539};
    541540
    542 /// ImplicitCopyCtorExpr represents the application of a function to a set of parameters,
    543 /// along with a set of copy constructor calls, one for each argument.
    544 class ImplicitCopyCtorExpr : public Expression {
    545 public:
    546         ImplicitCopyCtorExpr( ApplicationExpr * callExpr );
    547         ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other );
    548         virtual ~ImplicitCopyCtorExpr();
    549 
    550         ApplicationExpr *get_callExpr() const { return callExpr; }
    551         void set_callExpr( ApplicationExpr *newValue ) { callExpr = newValue; }
    552 
    553         std::list< Expression * > & get_copyCtors() { return copyCtors; }
    554         void set_copyCtors( std::list< Expression * > newValue ) { copyCtors = newValue; }
    555 
    556         std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }
    557         void set_tempDecls( std::list< ObjectDecl * > newValue ) { tempDecls = newValue; }
    558 
    559         std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }
    560         void set_returnDecls( std::list< ObjectDecl * > newValue ) { returnDecls = newValue; }
    561 
    562         std::list< Expression * > & get_dtors() { return dtors; }
    563         void set_dtors( std::list< Expression * > newValue ) { dtors = newValue; }
    564 
    565         virtual ImplicitCopyCtorExpr *clone() const { return new ImplicitCopyCtorExpr( *this ); }
    566         virtual void accept( Visitor &v ) { v.visit( this ); }
    567         virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    568         virtual void print( std::ostream &os, int indent = 0 ) const;
    569   private:
    570         ApplicationExpr * callExpr;
    571         std::list< Expression * > copyCtors;
    572         std::list< ObjectDecl * > tempDecls;
    573         std::list< ObjectDecl * > returnDecls;
    574         std::list< Expression * > dtors;
    575 };
    576 
    577541/// ValofExpr represents a GCC 'lambda expression'
    578542class UntypedValofExpr : public Expression {
     
    591555  private:
    592556        Statement *body;
     557};
     558
     559/// CompoundLiteralExpr represents a C99 'compound literal'
     560class 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;
    593579};
    594580
Note: See TracChangeset for help on using the changeset viewer.