Esempio n. 1
0
        public override object VisitUnaryOperatorExpression(MonoDevelop.CSharp.Ast.UnaryOperatorExpression unaryOperatorExpression, object data)
        {
            base.VisitUnaryOperatorExpression(unaryOperatorExpression, data);
            if (CutRegion.Contains(unaryOperatorExpression.StartLocation))
            {
                var left = unaryOperatorExpression.Expression as MonoDevelop.CSharp.Ast.IdentifierExpression;
                if (left != null && variables.ContainsKey(left.Identifier))
                {
                    variables[left.Identifier].IsChangedInsideCutRegion = true;
                }
            }

            /*
             * switch (unaryOperatorExpression.UnaryOperatorType) {
             * case MonoDevelop.CSharp.Ast.UnaryOperatorType.Increment:
             * case MonoDevelop.CSharp.Ast.UnaryOperatorType.Decrement:
             * case MonoDevelop.CSharp.Ast.UnaryOperatorType.PostIncrement:
             * case MonoDevelop.CSharp.Ast.UnaryOperatorType.PostDecrement:
             *      valueGetsChanged = true;
             *      break;
             * }
             * object result = base.VisitUnaryOperatorExpression (unaryOperatorExpression, data);
             * valueGetsChanged = false;
             * switch (unaryOperatorExpression.UnaryOperatorType) {
             * case MonoDevelop.CSharp.Ast.UnaryOperatorType.Increment:
             * case MonoDevelop.CSharp.Ast.UnaryOperatorType.Decrement:
             * case MonoDevelop.CSharp.Ast.UnaryOperatorType.PostIncrement:
             * case MonoDevelop.CSharp.Ast.UnaryOperatorType.PostDecrement:
             *      var left = unaryOperatorExpression.Expression as MonoDevelop.CSharp.Ast.IdentifierExpression;
             *      if (left != null && variables.ContainsKey (left.Identifier.Name))
             *              variables[left.Identifier.Name].GetsChanged = true;
             *      break;
             * }*/
            return(null);
        }
Esempio n. 2
0
 public virtual S VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression, T data)
 {
     return(VisitChildren(unaryOperatorExpression, data));
 }