1 //************************************************************************** 2 //** 3 //** ## ## ## ## ## #### #### ### ### 4 //** ## ## ## ## ## ## ## ## ## ## #### #### 5 //** ## ## ## ## ## ## ## ## ## ## ## ## ## ## 6 //** ## ## ######## ## ## ## ## ## ## ## ### ## 7 //** ### ## ## ### ## ## ## ## ## ## 8 //** # ## ## # #### #### ## ## 9 //** 10 //** $Id: vc_expr_assign.h 3135 2008-02-09 18:21:29Z dj_jl $ 11 //** 12 //** Copyright (C) 1999-2006 Jānis Legzdiņš 13 //** 14 //** This program is free software; you can redistribute it and/or 15 //** modify it under the terms of the GNU General Public License 16 //** as published by the Free Software Foundation; either version 2 17 //** of the License, or (at your option) any later version. 18 //** 19 //** This program is distributed in the hope that it will be useful, 20 //** but WITHOUT ANY WARRANTY; without even the implied warranty of 21 //** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 //** GNU General Public License for more details. 23 //** 24 //************************************************************************** 25 26 //========================================================================== 27 // 28 // VAssignment 29 // 30 //========================================================================== 31 32 class VAssignment : public VExpression 33 { 34 public: 35 enum EAssignOper 36 { 37 Assign, 38 AddAssign, 39 MinusAssign, 40 MultiplyAssign, 41 DivideAssign, 42 ModAssign, 43 AndAssign, 44 OrAssign, 45 XOrAssign, 46 LShiftAssign, 47 RShiftAssign, 48 }; 49 EAssignOper Oper; 50 VExpression* op1; 51 VExpression* op2; 52 53 VAssignment(EAssignOper, VExpression*, VExpression*, const TLocation&); 54 ~VAssignment(); 55 VExpression* DoResolve(VEmitContext&); 56 void Emit(VEmitContext&); 57 }; 58 59 //========================================================================== 60 // 61 // VPropertyAssign 62 // 63 //========================================================================== 64 65 class VPropertyAssign : public VInvocation 66 { 67 public: 68 VPropertyAssign(VExpression* ASelfExpr, VMethod* AFunc, bool AHaveSelf, 69 const TLocation& ALoc); 70 bool IsPropertyAssign() const; 71 }; 72