public override void VisitIsExpression(IsExpression isExpression)
 {
     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);
     }
     base.VisitIsExpression(isExpression);
 }
Beispiel #2
0
 void IAstVisitor.VisitIsExpression(IsExpression isExpression)
 {
     Visit(EnterIsExpression, LeaveIsExpression, isExpression);
 }
        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));
        }