Changeset d9e2280 for src/SynTree


Ignore:
Timestamp:
Aug 5, 2016, 3:56:24 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
35f9114
Parents:
71a3593
Message:

even more more refactoring of parser code

Location:
src/SynTree
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r71a3593 rd9e2280  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug  3 17:06:51 2016
    13 // Update Count     : 45
     12// Last Modified On : Fri Aug  5 14:23:56 2016
     13// Update Count     : 49
    1414//
    1515
     
    529529}
    530530
    531 RangeExpr::RangeExpr( ConstantExpr *low, ConstantExpr *high ) : low( low ), high( high ) {}
     531RangeExpr::RangeExpr( Expression *low, Expression *high ) : low( low ), high( high ) {}
    532532RangeExpr::RangeExpr( const RangeExpr &other ) : low( other.low->clone() ), high( other.high->clone() ) {}
    533533void RangeExpr::print( std::ostream &os, int indent ) const {
  • src/SynTree/Expression.h

    r71a3593 rd9e2280  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug  5 10:26:07 2016
    13 // Update Count     : 28
     12// Last Modified On : Fri Aug  5 14:23:58 2016
     13// Update Count     : 32
    1414//
    1515
     
    637637class RangeExpr : public Expression {
    638638  public:
    639         RangeExpr( ConstantExpr *low, ConstantExpr *high );
     639        RangeExpr( Expression *low, Expression *high );
    640640        RangeExpr( const RangeExpr &other );
    641641
    642         ConstantExpr * get_low() const { return low.get(); }
    643         ConstantExpr * get_high() const { return high.get(); }
    644         RangeExpr * set_low( ConstantExpr *low ) { RangeExpr::low.reset( low ); return this; }
    645         RangeExpr * set_high( ConstantExpr *high ) { RangeExpr::high.reset( high ); return this; }
     642        Expression * get_low() const { return low; }
     643        Expression * get_high() const { return high; }
     644        RangeExpr * set_low( Expression *low ) { RangeExpr::low = low; return this; }
     645        RangeExpr * set_high( Expression *high ) { RangeExpr::high = high; return this; }
    646646
    647647        virtual RangeExpr *clone() const { return new RangeExpr( *this ); }
     
    650650        virtual void print( std::ostream &os, int indent = 0 ) const;
    651651  private:
    652         std::unique_ptr<ConstantExpr> low, high;
     652        Expression *low, *high;
    653653};
    654654
Note: See TracChangeset for help on using the changeset viewer.