Compile-time AST manipulation API

0ffh frank at frankhirsch.youknow.what.todo.net
Sun Nov 25 23:24:18 PST 2007


Maël wrote:
> Plus, if it is implemented as a pre-processor (CamlP4-like) you could
> make powerful domain-specific languages and directly embbed them in D
> programs

You wouldn't even need CTFE for it, if you'd just add a compiler switch to
output the AST in some text format (say, in Annotated Term Format), and a
possibility to feed those files back to the compiler, instead of D source.
Hacking the compiler would become a breeze. =)

regards, frank




More information about the Digitalmars-d mailing list