Generating F# code

前端 未结 4 1649
春和景丽
春和景丽 2021-02-06 01:58

T4 is the \"official\" code generation engine for C#/VB.NET. But F# doesn\'t support it (this is from April, but I couldn\'t find any newer mentions). So what is a good way to g

4条回答
  •  旧巷少年郎
    2021-02-06 02:19

    I looked around at various options, and ended up for my relatively simple and static code-generation needs using a *.fsx script that uses a TextWriter with fprintf to write out the generated F# code.

    I actually do use FParsec for some parsing work, but as I'm not translating from some other syntax into F#, the two pieces have little to do with each other.

提交回复
热议问题