示例#1
0
 private static void WriteReturnStatement(BoundReturnStatement node, IndentedTextWriter writer)
 {
     writer.WriteKeyword(SyntaxKind.ReturnKeyword);
     if (node.Expression != null)
     {
         writer.WriteWhiteSpace();
         node.Expression.WriteTo(writer);
     }
     writer.WriteLine();
 }
示例#2
0
        protected virtual BoundStatement RewriteReturnStatement(BoundReturnStatement node)
        {
            BoundExpression expression = node.Expression == null ? null : RewriteExpression(node.Expression);

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

            return(new BoundReturnStatement(expression));
        }