S IAstVisitor <T, S> .VisitIsExpression(IsExpression isExpression, T data)
        {
            var handler = IsExpressionVisited;

            if (handler != null)
            {
                handler(isExpression, data);
            }
            return(VisitChildren(isExpression, data));
        }
 public override object VisitIsExpression(IsExpression isExpression, object data)
 {
     if (InsertParenthesesForReadability)
     {
         // few people know the precedence of 'is', so always put parentheses in nice-looking mode.
         ParenthesizeIfRequired(isExpression.Expression, Primary);
     }
     else
     {
         ParenthesizeIfRequired(isExpression.Expression, RelationalAndTypeTesting);
     }
     return(base.VisitIsExpression(isExpression, data));
 }
예제 #3
0
 public virtual S VisitIsExpression(IsExpression isExpression, T data)
 {
     return(VisitChildren(isExpression, data));
 }
예제 #4
0
        protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
        {
            IsExpression o = other as IsExpression;

            return(o != null && this.Expression.DoMatch(o.Expression, match) && this.Type.DoMatch(o.Type, match));
        }