Exemplo 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();
     }
 }
Exemplo n.º 2
0
 public Formula Visit(VariableFormula formula)
 {
     return formula;
 }
Exemplo n.º 3
0
 public virtual Formula Visit(VariableFormula formula)
 {
     Visit((Formula)formula);
     return visitor.Visit(formula);
 }