示例#1
0
 private static void WriteConversionExpression(BoundConversionExpression node, IndentedTextWriter writer)
 {
     writer.WriteIdentifier(node.Type.Name);
     writer.WritePunctuation(SyntaxKind.OpenParenthesisToken);
     node.Expression.WriteTo(writer);
     writer.WritePunctuation(SyntaxKind.CloseParenthesisToken);
 }
示例#2
0
 private static void WriteConversionExpression(BoundConversionExpression node, IndentedTextWriter writer)
 {
     writer.WriteIdentifier(node.Type.Name);
     writer.WritePunctuation("(");
     node.Expression.WriteTo(writer);
     writer.WritePunctuation(")");
 }
示例#3
0
        protected virtual BoundExpression RewriteConversionExpression(BoundConversionExpression node)
        {
            var expression = RewriteExpression(node.Expression);
            if (expression == node.Expression)
                return node;

            return new BoundConversionExpression(node.Type, expression);
        }
示例#4
0
        protected virtual BoundExpression RewriteConversionExpression(BoundConversionExpression node)
        {
            var expression = RewriteExpression(node.Expression);

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

            return(new BoundConversionExpression(node.Syntax, node.Type, expression));
        }