コード例 #1
0
 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);
 }
コード例 #2
0
        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));
        }
コード例 #3
0
 void ISyntaxVisitor.VisitInstanceFunctionCallSyntax(InstanceFunctionCallSyntax syntax) => ReplaceCurrent(syntax, ReplaceInstanceFunctionCallSyntax);