Example #1
0
        public static CSharpMulDivExpression operator %(ExpressionBase left, CSharpIExpression right)
        {
            ICSharpMulDivExpression   leftSide  = (ICSharpMulDivExpression)left.AffixTo(OperatorPrecedences.CSharpMulDivOperation);
            IUnaryOperationExpression rightSide = (IUnaryOperationExpression)right.AffixTo(OperatorPrecedences.UnaryOperation);

            return(new CSharpMulDivExpression(leftSide, CSharpMulDivOperation.Remainder, rightSide));
        }
 public override bool Visit(IUnaryOperationExpression expression, object context)
 {
     _stack.Push(expression);
     try
     {
         return(base.Visit(expression, context));
     }
     finally
     {
         _stack.Pop();
     }
 }
Example #3
0
 public abstract IExpression Transform(IUnaryOperationExpression expression);
Example #4
0
 void IExpressionVisitor.Visit(IUnaryOperationExpression expression)
 {
     this.Translate(expression);
 }
 /// <summary>
 /// Initializes a new <see cref="InvalidInvertTargetException"/> with the specified error
 /// <paramref name="message"/> and <paramref name="innerException"/>.
 /// </summary>
 /// <param name="message">The <see cref="System.String"/> describing the error.</param>
 /// <param name="innerException">The <see cref="Exception"/> that is the cause of the current
 /// <see cref="InvalidInvertTargetException"/>, or a null reference if none is specified.</param>
 /// <param name="offendingExpression">The <see cref="IExpression"/> that caused the
 /// <see cref="InvalidInvertTargetException"/>.</param>
 public InvalidInvertTargetException(string message, Exception innerException, IUnaryOperationExpression offendingExpression)
     : base(message, innerException, offendingExpression)
 {
 }
 /// <summary>
 /// Initializes a new <see cref="InvalidInvertTargetException"/> with the <paramref name="offendingExpression"/>
 /// that caused the <see cref="InvalidInvertTargetException"/>.
 /// </summary>
 /// <remarks><see cref="Exception.Message"/> defaults to: "Expression exception".</remarks>
 /// <param name="offendingExpression">The <see cref="IExpression"/> that caused the
 /// <see cref="InvalidInvertTargetException"/>.</param>
 public InvalidInvertTargetException(IUnaryOperationExpression offendingExpression)
     : base("Expression exception", offendingExpression)
 {
 }
Example #7
0
 TransformationImpact IExpressionVisitor <TransformationImpact> .Visit(IUnaryOperationExpression expression)
 {
     return(CalculateRefactorImpact(expression));
 }
Example #8
0
 public override void TranslateExpression(IUnaryOperationExpression unOpExpression)
 {
     throw new NotImplementedException();
 }
Example #9
0
 public abstract void TranslateExpression(IUnaryOperationExpression unOpExpression);
Example #10
0
 public TestLinkerResult Visit(IUnaryOperationExpression expression, ICompilationContext context)
 {
     throw new NotImplementedException();
 }
Example #11
0
 public abstract TransformationImpact CalculateRefactorImpact(IUnaryOperationExpression expression);
Example #12
0
 public abstract void Translate(IUnaryOperationExpression expression);
Example #13
0
 /// <summary>
 /// Initializes a new <see cref="InvalidIncrementTargetException"/> with the specified error
 /// <paramref name="message"/> and <paramref name="offendingExpression"/>.
 /// </summary>
 /// <param name="message">The <see cref="System.String"/> describing the error.</param>
 /// <param name="offendingExpression">The <see cref="IExpression"/> that caused the
 /// <see cref="InvalidIncrementTargetException"/>.</param>
 public InvalidIncrementTargetException(string message, IUnaryOperationExpression offendingExpression)
     : base(message, offendingExpression)
 {
 }
Example #14
0
 public TransformationKind Visit(IUnaryOperationExpression expression, ITransformationContext context)
 {
     return(TransformationKind.Investigate);
 }