nreco / lambdaparser

Runtime parser for string expressions (formulas, method calls). Builds dynamic LINQ expression tree and compiles it to lambda delegate.
http://www.nrecosite.com/
MIT License
309 stars 55 forks source link

Is it possible to support nested expression parsing? #14

Closed snakorse closed 6 years ago

snakorse commented 6 years ago

Is it possible to support nested expression parsing like this: lambdaParser.Parse("(List<string> list) => list.Where(o => !string.IsNullOrEmpty(o))");

VitaliyMF commented 6 years ago

LambdaParser cannot evaluate expressions like that. Usually LambdaParser is used for expressions that can be entered by the user - like formulas or custom conditions. As for me, ability to define nested lambdas is overkill, as you always provide 'helper' functions that can be used in the expression like "List.RemoveEmptyEntries(list)".

snakorse commented 6 years ago

Got it, thanks.