public MyInteger execute(Context context) { IntReturningFunction function = _functionSet.Lookup( _name ); Context myContext = new Context(); for (int i = 0; i < function.variableNames.Count; i++) { myContext.AddVariableAssignment(function.variableNames[i], _args[i].execute(context)); } return(function.execute(myContext)); }
public void Add(FunctionName functionname, IntReturningFunction intReturningFunction) { _dictionary[functionname.name] = intReturningFunction; }