Example #1
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        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);
        }
Example #2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        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);
            }
        }
Example #3
0
            //-------------------------------------------------------------------------------------------------------------------------------------------------

            public OperatorIncrement(UnaryOperatorPosition position, bool positive)
            {
                m_Position       = position;
                m_Positive       = positive;
                m_StatementScope = StatementScope.Current;
            }