public override ICodeNode VisitExplicitCastExpression(ExplicitCastExpression node)
 {
     if (node.get_Expression().get_CodeNodeType() != 22)
     {
         return(this.VisitExplicitCastExpression(node));
     }
     V_0 = node.get_ExpressionType().Resolve();
     if (V_0 == null || !V_0.get_IsEnum() || node.get_ExpressionType().get_IsArray())
     {
         return(node);
     }
     return(EnumHelper.GetEnumExpression(node.get_ExpressionType().Resolve(), node.get_Expression() as LiteralExpression, this.typeSystem));
 }
 public override ICodeNode VisitExplicitCastExpression(ExplicitCastExpression node)
 {
     if (node.get_Expression().get_CodeNodeType() == 22 && String.op_Equality(node.get_TargetType().get_FullName(), this.currentTypeSystem.get_Boolean().get_FullName()))
     {
         this.FixBooleanLiteral(node.get_Expression() as LiteralExpression);
         return(node.get_Expression().CloneAndAttachInstructions(node.get_MappedInstructions()));
     }
     if (node.get_Expression().get_CodeNodeType() != 22 || !String.op_Equality(node.get_TargetType().get_FullName(), this.currentTypeSystem.get_Char().get_FullName()))
     {
         return(this.VisitExplicitCastExpression(node));
     }
     this.FixCharLiteral(node.get_Expression() as LiteralExpression);
     return(node.get_Expression().CloneAndAttachInstructions(node.get_MappedInstructions()));
 }
Exemplo n.º 3
0
 public virtual void VisitExplicitCastExpression(ExplicitCastExpression node)
 {
     this.Visit(node.get_Expression());
     return;
 }
 public virtual ICodeNode VisitExplicitCastExpression(ExplicitCastExpression node)
 {
     node.set_Expression((Expression)this.Visit(node.get_Expression()));
     return(node);
 }