protected virtual SyntaxBase ReplacePropertyAccessSyntax(PropertyAccessSyntax syntax) { var hasChanges = TryRewrite(syntax.BaseExpression, out var baseExpression); hasChanges |= TryRewriteStrict(syntax.Dot, out var dot); hasChanges |= TryRewriteStrict(syntax.PropertyName, out var propertyName); if (!hasChanges) { return(syntax); } return(new PropertyAccessSyntax(baseExpression, dot, propertyName)); }
void ISyntaxVisitor.VisitPropertyAccessSyntax(PropertyAccessSyntax syntax) => ReplaceCurrent(syntax, ReplacePropertyAccessSyntax);
public virtual void VisitPropertyAccessSyntax(PropertyAccessSyntax syntax) { this.Visit(syntax.BaseExpression); this.Visit(syntax.Dot); this.Visit(syntax.PropertyName); }