Getting function's AST at compile-time

deadalnix deadalnix at gmail.com
Mon Sep 16 04:02:03 PDT 2013


On Monday, 16 September 2013 at 10:55:20 UTC, Jacob Carlborg 
wrote:
> 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.

Sure, but it still need to be specified.


More information about the Digitalmars-d mailing list