コード例 #1
0
ファイル: Duplicator.cs プロジェクト: modulexcite/SHFB-1
 public override Expression VisitUnaryExpression(UnaryExpression unaryExpression)
 {
     if (unaryExpression == null) return null;
     unaryExpression = (UnaryExpression)base.VisitUnaryExpression((UnaryExpression)unaryExpression.Clone());
     return unaryExpression;
 }
コード例 #2
0
ファイル: CodeFlattener.cs プロジェクト: dbremner/specsharp
 /// <summary>
 /// </summary>
 /// <param name="expression">Cloned</param>
 public override Expression VisitUnaryExpression(UnaryExpression expression)
 {
   expression = (UnaryExpression)expression.Clone();
   switch(expression.NodeType)
   {
     case NodeType.Ldtoken:
       return expression;
     case NodeType.Ldftn:
       expression.Operand = (Expression)this.Visit(expression.Operand);
       return expression;
     case NodeType.AddressOf:
     case NodeType.ReadOnlyAddressOf:
     case NodeType.OutAddress: // alias of AddressOf
     case NodeType.RefAddress: // alias of AddressOf
       expression.Operand = simplify_addressof_operand(expression.Operand);
       return expression;
   }
   expression.Operand = simplify(expression.Operand);
   return expression;
 }
コード例 #3
0
ファイル: CodeFlattener.cs プロジェクト: dbremner/specsharp
    public override Expression VisitPopExpr(UnaryExpression unex) {
      Expression operand = (Expression)this.Visit(unex.Operand);

      unex = (UnaryExpression)unex.Clone();
      unex.Operand = operand;
      return unex;
    }
コード例 #4
0
ファイル: ControlFlow.cs プロジェクト: hesam/SketchSharp
 public override Expression VisitUnaryExpression(UnaryExpression unaryExpression) {
   if (unaryExpression == null) return null;
   unaryExpression = (UnaryExpression)unaryExpression.Clone();
   unaryExpression.Operand = this.VisitExpression(unaryExpression.Operand);
   return unaryExpression;
 }