Proposal: __traits(getComment, symbol)
Max Haughton
maxhaton at gmail.com
Thu Aug 29 11:40:17 UTC 2019
On Thursday, 29 August 2019 at 10:20:28 UTC, RazvanN wrote:
> On Wednesday, 28 August 2019 at 22:18:28 UTC, Max Haughton
> wrote:
>> On Wednesday, 28 August 2019 at 17:35:56 UTC, Manu wrote:
>>> As a development workflow feature, having compiler access to
>>> symbol comments would be very useful in many cases.
>>
>> Speaking of which, has anyone tried/discussed giving access to
>> a frozen version of the AST through (say) __traits(getAST,
>> symbol)? I'd try it myself but I haven't spent the time
>> learning how dmd works.
>
> Whatever you want to do with traits(getAST) would likely be a
> job for dmd as a library.
I know but I had a idea to generate instruction selection trees
based on D code and a theorem prover which would be very nice to
do actually at compile time. Inefficient but very cool
You also can't get a list of template constraints from traits, I
don't think.
More information about the Digitalmars-d
mailing list