Пример #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));
        }