Пример #1
0
 public static IStatement Return(ISimpleExpression expression)
 {
     return(new ReturnStatement
     {
         Expression = expression
     });
 }
Пример #2
0
 public void SetUp()
 {
     _vr  = Mock.Of <IVariableReference>();
     _e1  = Mock.Of <ISimpleExpression>();
     _e2  = Mock.Of <ISimpleExpression>();
     _e3  = Mock.Of <ISimpleExpression>();
     _s1  = Mock.Of <IStatement>();
     _s2  = Mock.Of <IStatement>();
     _s3  = Mock.Of <IStatement>();
     _sut = new TestNodeVisitor();
 }
 private static Assignment AssignP(string varId, ISimpleExpression expr)
 {
     return(new Assignment
     {
         Reference = new PropertyReference
         {
             Reference = VarRef(varId),
             PropertyName = Names.Property("set get [{0}] [N.T, TestProject].P()", Fix.Object)
         },
         Expression = expr
     });
 }
Пример #4
0
 public UnaryExpression()
 {
     Operand = new UnknownExpression();
 }
Пример #5
0
 public virtual ISimpleExpression Anonymize([NotNull] ISimpleExpression expr)
 {
     return((ISimpleExpression)expr.Accept(_expr, 0));
 }
Пример #6
0
 internal MulExpression(ISimpleExpression left, ISimpleExpression right)
 {
     this.left  = left;
     this.right = right;
 }
Пример #7
0
 public static ISimpleExpression OfMul(ISimpleExpression e1, ISimpleExpression e2)
 {
     return(new MulExpression(e1, e2));
 }
Пример #8
0
 public static ISimpleExpression OfAdd(ISimpleExpression e1, ISimpleExpression e2)
 {
     return(new AddExpression(e1, e2));
 }
Пример #9
0
 private ISimpleExpression Anonymize([NotNull] ISimpleExpression expr)
 {
     return((ISimpleExpression)expr.Accept(this, 0));
 }
Пример #10
0
 public BinaryExpression()
 {
     LeftOperand  = new UnknownExpression();
     RightOperand = new UnknownExpression();
 }