Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.hpp

    re67991f r4e13e2a  
    3030
    3131// Must be included in *all* AST classes; should be #undef'd at the end of the file
    32 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node);
     32#define MUTATE_FRIEND \
     33    template<typename node_t> friend node_t * mutate(const node_t * node); \
     34        template<typename node_t> friend node_t * shallowCopy(const node_t * node);
     35
    3336
    3437class ConverterOldToNew;
     
    355358        MemberExpr * clone() const override { return new MemberExpr{ *this }; }
    356359        MUTATE_FRIEND
     360
     361        // Custructor overload meant only for AST conversion
     362        enum NoOpConstruction { NoOpConstructionChosen };
     363        MemberExpr( const CodeLocation & loc, const DeclWithType * mem, const Expr * agg,
     364            NoOpConstruction overloadSelector );
     365        friend class ::ConverterOldToNew;
     366        friend class ::ConverterNewToOld;
    357367};
    358368
     
    531541
    532542        CommaExpr( const CodeLocation & loc, const Expr * a1, const Expr * a2 )
    533         : Expr( loc ), arg1( a1 ), arg2( a2 ) {}
     543        : Expr( loc ), arg1( a1 ), arg2( a2 ) {
     544                this->result = a2->result;
     545        }
    534546
    535547        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
Note: See TracChangeset for help on using the changeset viewer.