Changes in src/SynTree/Expression.h [5d00425:312029a]
- File:
-
- 1 edited
-
src/SynTree/Expression.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r5d00425 r312029a 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thr Aug 15 13:46:00201913 // Update Count : 5411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 11 16:50:19 2019 13 // Update Count : 60 14 14 // 15 15 … … 28 28 #include "Label.h" // for Label 29 29 #include "Mutator.h" // for Mutator 30 #include "Declaration.h" // for Aggregate 30 31 #include "SynTree.h" // for UniqueId 31 32 #include "Visitor.h" // for Visitor … … 229 230 public: 230 231 Expression * arg; 231 enum Target { 232 Coroutine, Thread, Monitor, NUMBER_OF_TARGETS 233 } target; 234 235 KeywordCastExpr( Expression * arg, Target target ); 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 ); 236 240 KeywordCastExpr( const KeywordCastExpr & other ); 237 241 virtual ~KeywordCastExpr(); 238 242 239 const std::string &targetString() const;243 const char * targetString() const; 240 244 241 245 virtual KeywordCastExpr * clone() const override { return new KeywordCastExpr( * this ); } … … 274 278 UntypedMemberExpr( const UntypedMemberExpr & other ); 275 279 virtual ~UntypedMemberExpr(); 280 281 bool get_lvalue() const final; 276 282 277 283 Expression * get_member() const { return member; } … … 573 579 class AsmExpr : public Expression { 574 580 public: 575 Expression *inout;581 std::string inout; 576 582 Expression * constraint; 577 583 Expression * operand; 578 584 579 AsmExpr( Expression * inout, Expression * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}585 AsmExpr( const std::string * _inout, Expression * constraint, Expression * operand ) : inout( _inout ? *_inout : "" ), constraint( constraint ), operand( operand ) { delete _inout; } 580 586 AsmExpr( const AsmExpr & other ); 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; } 587 virtual ~AsmExpr() { delete constraint; delete operand; }; 591 588 592 589 virtual AsmExpr * clone() const override { return new AsmExpr( * this ); }
Note:
See TracChangeset
for help on using the changeset viewer.