Ignore:
Timestamp:
Aug 5, 2016, 11:03:04 AM (9 years ago)
Author:
Aaron Moss <a3moss@…>
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:
a2f920f
Parents:
5070fe4 (diff), 1b0020a (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:

Merge changes from master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r5070fe4 rc331406  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jul  4 14:45:32 2016
    13 // Update Count     : 23
     12// Last Modified On : Wed Aug  3 17:08:44 2016
     13// Update Count     : 27
    1414//
    1515
     
    1818
    1919#include <map>
     20#include <memory>
    2021#include "SynTree.h"
    2122#include "Visitor.h"
     
    634635};
    635636
     637class RangeExpr : public Expression {
     638  public:
     639        RangeExpr( ConstantExpr *low, ConstantExpr *high );
     640        RangeExpr( const RangeExpr &other );
     641
     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; }
     646
     647        virtual RangeExpr *clone() const { return new RangeExpr( *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        std::unique_ptr<ConstantExpr> low, high;
     653};
     654
    636655std::ostream & operator<<( std::ostream & out, Expression * expr );
    637656
Note: See TracChangeset for help on using the changeset viewer.