private void AddBoolToken(string boolValue) { if (this.GetNextOnDemand('(')) { this.Match(')'); this.AddToken(FormulaTokensFactory.CreateFunctionFromName(boolValue, FormulaTokenClass.Reference, 0)); } else { this.AddToken(FormulaTokenCode.Bool, bool.Parse(boolValue)); } }
private void AddFunctionToken(string functionValue) { this.isFunctionArgumentsProcessed = true; this.lastFunctionInfo = FormulaFunctionsTable.Instance[functionValue]; byte argumentsCount = this.ArgumentList(); this.isFunctionArgumentsProcessed = false; this.GetNextOnDemand(')'); FormulaFunctionInfo info = FormulaFunctionsTable.Instance[functionValue]; byte num2 = info.ArgumentsCount; if (num2 != 255) { string str = (num2 == 1) ? " argument." : " arguments."; if (argumentsCount != num2) { this.NotifyError(string.Concat(new object[] { "Function: ", FormulaFunctionsTable.Instance[info.Code].Name, " expects ", num2, str })); } } this.AddToken(FormulaTokensFactory.CreateFunctionFromName(functionValue, this.lastFunctionInfo.ReturnCode, argumentsCount)); }