Example #1
0
 public ArithmeticOperation(ArithmeticExpression left, SyntaxProperty <ArithmeticOperator> op, ArithmeticExpression right = null)
     : base(ExpressionNodeType.ArithmeticOperation)
 {
     LeftOperand  = left;
     Operator     = op;
     RightOperand = right;
 }
Example #2
0
 public override string ToString()
 {
     if (ArithmeticExpression != null)
     {
         return(ArithmeticExpression.ToString());
     }
     if (Variable != null)
     {
         return(Variable.ToString());
     }
     if (NullPointerValue != null)
     {
         return(NullPointerValue.ToString());
     }
     return(SelfObjectIdentifier.ToString());
 }
Example #3
0
        private string GetExpressionToAppend(ArithmeticExpression expression)
        {
            if (expression == null)
            {
                return(string.Empty);
            }
            var expressionToAppend = expression.ToString();

            if (expression.NodeType == ExpressionNodeType.NumericVariable &&
                (expression as NumericVariableOperand)?.NumericVariable.MainSymbolReference != null)
            {
                expressionToAppend = ((NumericVariableOperand)expression).NumericVariable
                                     .MainSymbolReference.ToString();
            }

            return(expressionToAppend);
        }
Example #4
0
 public static ArithmeticOperation CreateOperation(this ArithmeticOperator op, ArithmeticExpression left, ArithmeticExpression right = null)
 {
     return new ArithmeticOperation(left, new SyntaxProperty<ArithmeticOperator>(op, null), right);
 }
Example #5
0
 public ConditionOperand(ArithmeticExpression arithmeticExpression)
     : base(ExpressionNodeType.ConditionOperand)
 {
     ArithmeticExpression = arithmeticExpression;
 }
Example #6
0
 public ArithmeticOperation(ArithmeticExpression left, SyntaxProperty<ArithmeticOperator> op, ArithmeticExpression right = null)
     : base(ExpressionNodeType.ArithmeticOperation)
 {
     LeftOperand = left;
     Operator = op;
     RightOperand = right;
 }
Example #7
0
 public SubscriptExpression(ArithmeticExpression numericExpression)
 {
     NumericExpression = numericExpression;
 }
Example #8
0
 public ReferenceModifier(ArithmeticExpression leftmostCharacterPosition, ArithmeticExpression length)
 {
     LeftmostCharacterPosition = leftmostCharacterPosition;
     Length = length;
 }
Example #9
0
 public VariableOrExpression(ArithmeticExpression arithmeticExpression)
 {
     ArithmeticExpression = arithmeticExpression;
 }
Example #10
0
 public ReferenceModifier(ArithmeticExpression leftmostCharacterPosition, ArithmeticExpression length)
 {
     LeftmostCharacterPosition = leftmostCharacterPosition;
     Length = length;
 }
Example #11
0
 public SubscriptExpression(ArithmeticExpression numericExpression)
 {
     NumericExpression = numericExpression;
 }
Example #12
0
 public static ArithmeticOperation CreateOperation(this ArithmeticOperator op, ArithmeticExpression left, ArithmeticExpression right = null)
 {
     return(new ArithmeticOperation(left, new SyntaxProperty <ArithmeticOperator>(op, null), right));
 }
Example #13
0
 public ConditionOperand(ArithmeticExpression arithmeticExpression) :
     base(ExpressionNodeType.ConditionOperand)
 {
     ArithmeticExpression = arithmeticExpression;
 }
Example #14
0
 public virtual bool Visit(ArithmeticExpression arithmeticExpression)
 {
     return(true);
 }