public virtual void VisitInstanceFunctionCallSyntax(InstanceFunctionCallSyntax syntax) { this.Visit(syntax.BaseExpression); this.Visit(syntax.Dot); this.Visit(syntax.Name); this.Visit(syntax.OpenParen); this.VisitNodes(syntax.Arguments); this.Visit(syntax.CloseParen); }
protected virtual SyntaxBase ReplaceInstanceFunctionCallSyntax(InstanceFunctionCallSyntax syntax) { var hasChanges = TryRewrite(syntax.BaseExpression, out var baseExpression); hasChanges |= TryRewriteStrict(syntax.Dot, out var dot); hasChanges |= TryRewriteStrict(syntax.Name, out var name); hasChanges |= TryRewriteStrict(syntax.OpenParen, out var openParen); hasChanges |= TryRewriteStrict(syntax.Arguments, out var arguments); hasChanges |= TryRewriteStrict(syntax.CloseParen, out var closeParen); if (!hasChanges) { return(syntax); } return(new InstanceFunctionCallSyntax(baseExpression, dot, name, openParen, arguments, closeParen)); }
void ISyntaxVisitor.VisitInstanceFunctionCallSyntax(InstanceFunctionCallSyntax syntax) => ReplaceCurrent(syntax, ReplaceInstanceFunctionCallSyntax);