Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r312029a r5d00425  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec 11 16:50:19 2019
    13 // Update Count     : 60
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thr Aug 15 13:46:00 2019
     13// Update Count     : 54
    1414//
    1515
     
    2828#include "Label.h"                // for Label
    2929#include "Mutator.h"              // for Mutator
    30 #include "Declaration.h"          // for Aggregate
    3130#include "SynTree.h"              // for UniqueId
    3231#include "Visitor.h"              // for Visitor
     
    230229public:
    231230        Expression * arg;
    232         struct Concrete {
    233                 std::string field;
    234                 std::string getter;
    235         };
    236         AggregateDecl::Aggregate target;
    237         Concrete concrete_target;
    238 
    239         KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target );
     231        enum Target {
     232                Coroutine, Thread, Monitor, NUMBER_OF_TARGETS
     233        } target;
     234
     235        KeywordCastExpr( Expression * arg, Target target );
    240236        KeywordCastExpr( const KeywordCastExpr & other );
    241237        virtual ~KeywordCastExpr();
    242238
    243         const char * targetString() const;
     239        const std::string & targetString() const;
    244240
    245241        virtual KeywordCastExpr * clone() const override { return new KeywordCastExpr( * this ); }
     
    278274        UntypedMemberExpr( const UntypedMemberExpr & other );
    279275        virtual ~UntypedMemberExpr();
    280 
    281         bool get_lvalue() const final;
    282276
    283277        Expression * get_member() const { return member; }
     
    579573class AsmExpr : public Expression {
    580574  public:
    581         std::string inout;
     575        Expression * inout;
    582576        Expression * constraint;
    583577        Expression * operand;
    584578
    585         AsmExpr( const std::string * _inout, Expression * constraint, Expression * operand ) : inout( _inout ? *_inout : "" ), constraint( constraint ), operand( operand ) { delete _inout; }
     579        AsmExpr( Expression * inout, Expression * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}
    586580        AsmExpr( const AsmExpr & other );
    587         virtual ~AsmExpr() { delete constraint; delete operand; };
     581        virtual ~AsmExpr() { delete inout; delete constraint; delete operand; };
     582
     583        Expression * get_inout() const { return inout; }
     584        void set_inout( Expression * newValue ) { inout = newValue; }
     585
     586        Expression * get_constraint() const { return constraint; }
     587        void set_constraint( Expression * newValue ) { constraint = newValue; }
     588
     589        Expression * get_operand() const { return operand; }
     590        void set_operand( Expression * newValue ) { operand = newValue; }
    588591
    589592        virtual AsmExpr * clone() const override { return new AsmExpr( * this ); }
Note: See TracChangeset for help on using the changeset viewer.