Exemplo n.º 1
0
        protected virtual BoundStatement RewriteReturnStatement(BoundReturnStatement node)
        {
            var expression = node.Expression == null ? null : this.RewriteExpression(node.Expression);

            if (expression == node.Expression)
            {
                return(node);
            }

            return(new BoundReturnStatement(node.Syntax, expression));
        }
Exemplo n.º 2
0
        private static void WriteReturnStatement(BoundReturnStatement node, IndentedTextWriter writer)
        {
            writer.WriteKeyword(SyntaxKind.ReturnKeyword);

            if (node.Expression != null)
            {
                writer.WriteSpace();
                node.Expression.WriteTo(writer);
            }

            writer.WriteLine();
        }