Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing a DSL on .NET

I'm implementing a small DSL on top of .NET (4.0) and I'm currently using Expression Trees to turn the DSL into chunks of executable code.

The DSL is predefined as we're implementing support for a legacy file format.

Are Expression Trees the most appropriate tool for this job?

like image 540
Greg B Avatar asked May 25 '26 05:05

Greg B


1 Answers

Expression Trees are useless if you want to generate new types. And for most of the typical DSLs you have to build types. So, a good old System.Reflection.Emit is likely to be a better choice.

like image 53
SK-logic Avatar answered May 27 '26 07:05

SK-logic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!