atilaneves / dpp

Directly include C headers in D source code
Boost Software License 1.0
230 stars 31 forks source link

A whitelist that recursively whitelists "dependent" types/declarations #138

Open Laeeth opened 5 years ago

Laeeth commented 5 years ago

Recursive for white list means pull in all things it depends on Blacklisting overrides whitelisting and aborts the recursive process at that level. Blacklist means it's just a blob

atilaneves commented 5 years ago

Finding every type and declaration that another type/declaration "depends on" is not trivial.

Laeeth commented 5 years ago

You end up with the need for multiple passes at some point, in which case you need to make the printing the last stage and eg operate on the ast in earlier stages. But although that brings benefits it is quite a lot of work. I was thinking one might as well base the D version off dparser except that it seems to be closer to a parse tree.