Getting function's AST at compile-time

Jacob Carlborg doob at me.com
Mon Sep 16 03:55:19 PDT 2013


On 2013-09-16 10:05, deadalnix wrote:

> That is something I'd like to see, but it has 2 difficult pitfalls :
>   - Compile time feature aren't always well defined. What happen if the
> AST of the function you look for depends on the CTFE you are running ?
> Note that is can in very subtle manners.
>   - It require to define the AST properly. And then, every change in the
> AST become a breaking change. That is really difficult, especially since
> we are reluctant to clean up some implementations quirks (some even
> consider them as feature).

The AST returned does not need to have the same API as the AST used by 
the compiler.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list