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]);
     }
 }
Example #2
0
 public static FunctionRepository Create()
 {
     var repo = new FunctionRepository();
     repo.LoadModule(new BuiltInFunctions());
     return repo;
 }
Example #3
0
 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")));
 }
Example #5
0
 public Lexer(FunctionRepository functionRepository, INameValueProvider nameValueProvider)
     : this(new SourceCodeTokenizer(functionRepository, nameValueProvider), new SyntacticAnalyzer())
 {
 }