void ISyntaxVisitor.VisitParenthesizedExpressionSyntax(ParenthesizedExpressionSyntax syntax) => ReplaceCurrent(syntax, ReplaceParenthesizedExpressionSyntax);
public virtual void VisitParenthesizedExpressionSyntax(ParenthesizedExpressionSyntax syntax) { this.Visit(syntax.OpenParen); this.Visit(syntax.Expression); this.Visit(syntax.CloseParen); }
protected virtual ParenthesizedExpressionSyntax ReplaceParenthesizedExpressionSyntax(ParenthesizedExpressionSyntax syntax) { var hasChanges = Rewrite(syntax.OpenParen, out var openParen); hasChanges |= Rewrite(syntax.Expression, out var expression); hasChanges |= Rewrite(syntax.CloseParen, out var closeParen); if (!hasChanges) { return(syntax); } return(new ParenthesizedExpressionSyntax(openParen, expression, closeParen)); }