built in import c header files
norm
normical at gmail.com
Wed Oct 7 01:29:05 UTC 2020
On Tuesday, 6 October 2020 at 22:42:11 UTC, 12345swordy wrote:
> On Tuesday, 6 October 2020 at 21:04:20 UTC, Meta wrote:
>> On Tuesday, 6 October 2020 at 20:59:54 UTC, 12345swordy wrote:
>>> I remember reading a reddit comment saying that if d were to
>>> import c header files directly without any 3rd party
>>> libraries it would be a game changer. The question is: how
>>> difficult to implement a C AST parser for the dmd front end?
>>>
>>>
>>> -Alex
>>
>> You're in luck: https://github.com/atilaneves/dpp
>
> What part of "built in and not part of a 3rd party library" do
> you not understand?
You could easily work it out for yourself by looking at any C
parser and the DMD front. But why bother with C, it is trivial to
generate C bindings from headers. C++ is where it becomes
complicated and where it would be useful.
More information about the Digitalmars-d
mailing list