示例#1
0
        protected virtual BoundExpression RewriteCallExpression(BoundCallExpression node)
        {
            var args = this.RewriteExpressions(node.Arguments);

            if (args.SequenceEqual(node.Arguments))
            {
                return(node);
            }

            return(new BoundCallExpression(node.Syntax, node.Function, args.ToImmutableArray()));
        }
示例#2
0
        private static void WriteCallExpression(BoundCallExpression node, IndentedTextWriter writer)
        {
            writer.WriteIdentifier(node.Function.Name);
            writer.WritePunctuation(SyntaxKind.OpenParenToken);

            var isFirst = true;

            foreach (var argument in node.Arguments)
            {
                if (isFirst)
                {
                    isFirst = false;
                }
                else
                {
                    writer.WritePunctuation(SyntaxKind.CommaToken);
                    writer.WriteSpace();
                }

                argument.WriteTo(writer);
            }

            writer.WritePunctuation(SyntaxKind.CloseParenToken);
        }