public string AssignFunction(string symbol, CalcFunction function) { symbol.ThrowIfNullOrWhiteSpace(nameof(symbol)); if (function == null) { throw new ArgumentNullException(nameof(function)); } functions[symbol] = function; return(symbol); }
public FunctionMetadata(CalcFunction func, CalcFuncToken token) { ArgCounter = 1; this.func = func; this.token = token; }
public CalcFuncToken New(CalcFunction func) { return(new CalcFuncToken(func, Value, OriginIndex)); }
public bool Function(string symbol, out CalcFunction function) { symbol.ThrowIfNullOrWhiteSpace(nameof(symbol)); return(functions.TryGetValue(symbol, out function)); }
public CalcFuncToken(CalcFunction func, string val, int originIdx) : base(TokenType.Function, val, originIdx) { f = func; }