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; }
public virtual Formula Visit(VariableFormula formula) { Visit((Formula)formula); return visitor.Visit(formula); }