Libdparse with DMD frontend
Basile B.
b2.temp at gmx.com
Sat Apr 27 13:04:06 UTC 2019
On Saturday, 27 April 2019 at 12:55:07 UTC, Eugene Wissner wrote:
> libdparse was created at the time D frontend was written in a
> different language and wasn‘t available as a library.
>
> The D frontend itself isn‘t allowed to adopt the latest D
> features straightaway, because it would make bootstrapping and
> porting to other compilers more complicated than it should be.
> So the frontend should be compilable with an older version of
> DMD. Furthermore it should be compatible with C++, so it can be
> used by GDC and LDC. Therefore DMD is not always pretty and
> might be not the best fit for the high level code and could
> profit from a high-level wrapper.
>
> Can libdparse be such a wrapper? Updating libdparse would
> probably be less painful, because it doesn‘t need to
> reimplement the frontend.
> Writing another "libdparse" is not desired because libdparse is
> used by such tools like D-Scanner and becomes actually useful
> if used by that tools.
>
> It is a big change to libdparse, so I‘d like to know if
> something is wrong with it and if the work on it is welcome.
I don't believe that this is possible.
1. offical front end AST is different of dparse AST
2. dparse uses special stuff for memory allocs
It's only possible in theory. I rather think that at some point a
new tooling generation could hatch if DMD as a library becomes
usable.
More information about the Digitalmars-d
mailing list