Пример #1
0
        private static void WritePatternSectionExpression(BoundPatternSectionExpression node, IndentedTextWriter writer)
        {
            WritePatterns(node.Patterns, writer);

            writer.WritePunctuation(SyntaxKind.EqGtToken);

            node.Expression.WriteTo(writer);
        }
Пример #2
0
        protected virtual BoundExpression RewritePatternSectionExpression(BoundPatternSectionExpression node)
        {
            var expr     = this.RewriteExpression(node.Expression);
            var patterns = this.RewritePatterns(node.Patterns);

            if (expr == node.Expression && patterns.SequenceEqual(node.Patterns))
            {
                return(node);
            }

            return(new BoundPatternSectionExpression(node.Syntax, patterns, expr));
        }