I like Nemerle's macro syntax much better than T4. Are there any examples or is it possible to use Nemerle to generate c# code that is then used by the actual Microsoft c# compiler for input in a similar way to T4. Thanks.
Examples of Nemerle to generate c# code like T4 does
440 Views Asked by Aaron Stainback At
3
There are 3 best solutions below
1
On
Create a Nemerle to C# prettyprinter is possible. But, the generated code will be ugly (not readable).
0
On
I know this answer is irrelevant but there is a Nemerle to Javascript compiler NemerleWeb
Similar methodology can be used to generate C# files.
Nemerle macros do not generate code, but rather modify the abstract syntax tree of the program as it is being compiled. However, the Nemerle compiler can read C#, and you can even use Nemerle macros in those C# files.