@Araq:

> An object does not only consist of fields, it can have case and when etc.

Which is part of the reason why doing something as simple as getting the fields 
robustly gets difficult when dealing directly with the AST; there isn't just 
one canonical representation. I thought the compiler might have such a 
canonical representation internally which can be queried, but I guess not.

@chrisheller:

> Keep in mind that you can write some of your own compile time methods

I did write my own (partial) solution. It just doesn't work for every valid 
tree configuration as of yet. If the plan is to write an API on top of the AST 
one anyway, then I guess I'll just keep building up on mine and release it 
eventually as a library when it becomes robust. Then someone could integrate 
into Nim core if it comes out any good.

Reply via email to