Esempio n. 1
0
 public static void EvalAllocate(MethodCallExpression exp, ExpressionToFormulaState state)
 {
     if (exp.Arguments[0].NodeType == ExpressionType.MemberAccess)
     {
         var fi = (FieldInfo)((MemberExpression)exp.Arguments[0]).Member;
         var variable = new VariableFormula(fi.Name, fi.FieldType);
         state.CurrentBlock.Formulas.Push(variable);
     }
     else
     {
         throw new NotSupportedException();
     }
 }
 public Formula Visit(VariableFormula formula)
 {
     return formula;
 }
Esempio n. 3
0
 public virtual Formula Visit(VariableFormula formula)
 {
     Visit((Formula)formula);
     return visitor.Visit(formula);
 }