public FunctionCompilerFactory(FunctionRepository repository) { _specialCompilers.Add(typeof(If), new IfFunctionCompiler(repository.GetFunction("if"))); _specialCompilers.Add(typeof(IfError), new IfErrorFunctionCompiler(repository.GetFunction("iferror"))); _specialCompilers.Add(typeof(IfNa), new IfNaFunctionCompiler(repository.GetFunction("ifna"))); foreach (var key in repository.CustomCompilers.Keys) { _specialCompilers.Add(key, repository.CustomCompilers[key]); } }
public static FunctionRepository Create() { var repo = new FunctionRepository(); repo.LoadModule(new BuiltInFunctions()); return repo; }
private ParsingConfiguration() { FunctionRepository = FunctionRepository.Create(); }
public FunctionCompilerFactory(FunctionRepository repository) { _specialCompilers.Add(typeof(If), new IfFunctionCompiler(repository.GetFunction("if"))); _specialCompilers.Add(typeof(IfError), new IfErrorFunctionCompiler(repository.GetFunction("iferror"))); _specialCompilers.Add(typeof(IfNa), new IfNaFunctionCompiler(repository.GetFunction("ifna"))); }
public Lexer(FunctionRepository functionRepository, INameValueProvider nameValueProvider) : this(new SourceCodeTokenizer(functionRepository, nameValueProvider), new SyntacticAnalyzer()) { }