protected override object VisitAssignment(Assignment A)
{
LinqExpr value = target.Compile(A.Value);
switch (A.Operator)
{
case Operator.Add: target.Add(LinqExpr.AddAssign(target.LookUp(A.Assign), value)); break;
case Operator.Subtract: target.Add(LinqExpr.SubtractAssign(target.LookUp(A.Assign), value)); break;
case Operator.Multiply: target.Add(LinqExpr.MultiplyAssign(target.LookUp(A.Assign), value)); break;
case Operator.Divide: target.Add(LinqExpr.DivideAssign(target.LookUp(A.Assign), value)); break;
case Operator.Power: target.Add(LinqExpr.PowerAssign(target.LookUp(A.Assign), value)); break;
case Operator.And: target.Add(LinqExpr.AndAssign(target.LookUp(A.Assign), value)); break;
case Operator.Or: target.Add(LinqExpr.OrAssign(target.LookUp(A.Assign), value)); break;
case Operator.Equal:
LinqExpr x = target.LookUp(A.Assign);
if (x == null)
{
x = target.DeclInit(A.Assign, A.Value);
}
target.Add(LinqExpr.Assign(x, value));
break;
default: throw new NotImplementedException("Operator not implemented for assignment.");
}
return(null);
}