//----------------------------------------------------------------------------------------------------------------------------------------------------- public HappilUnaryExpression( HappilMethod ownerMethod, IUnaryOperator <TOperand> @operator, IHappilOperand <TOperand> operand, UnaryOperatorPosition position = UnaryOperatorPosition.Prefix) : base(ownerMethod) { m_Operand = operand; m_Operator = @operator; m_Position = position; var scope = StatementScope.Current; scope.Consume(operand as IHappilExpression); scope.RegisterExpressionStatement(this); }
//----------------------------------------------------------------------------------------------------------------------------------------------------- public UnaryExpressionOperand( IUnaryOperator <TOperand> @operator, IOperand <TOperand> operand, UnaryOperatorPosition position = UnaryOperatorPosition.Prefix) { m_Operand = operand; m_Operator = @operator; m_Position = position; if (StatementScope.Exists) { var scope = StatementScope.Current; scope.Consume(operand as IExpressionOperand); scope.RegisterExpressionStatement(this); } }
//------------------------------------------------------------------------------------------------------------------------------------------------- public OperatorIncrement(UnaryOperatorPosition position, bool positive) { m_Position = position; m_Positive = positive; m_StatementScope = StatementScope.Current; }