Removing libdparse dependency from DLS

rikki cattermole rikki at cattermole.co.nz
Fri Feb 21 13:08:17 UTC 2020


On 22/02/2020 1:53 AM, Jacob Carlborg wrote:
> On 2020-02-21 08:57, RazvanN wrote:
> 
>> First, let me give you some context on this project. Cristi is a 
>> bachelor student that is doing his thesis with me and Edi.
>>
>> The primary objective of the project is twofold: make DLs use dmd as 
>> library but at the same time improve the library interface and do the 
>> necessary compiler modifications so that dmd-fe becomes usable. 
>> Actually, integrating with DLS is just a dry run to see what kind of 
>> interface does the dmd-fe need to be usable in a real life project.
>>
>> However, seeing how DLS uses all the other tools that rely on 
>> libdparse we thought that maybe it would be a better strategy to try 
>> and update those other tools.
>>
>> Any suggestions are welcome.
> 
> I would start at the bottom, not the top. That is, start by working on 
> one of the tools, the one(s) at the lowest level, that DLS depends on.
> 
> I would probably start with the simplest one, that might be dfmt. But 
> for, I think, that DMD needs to support end locations for tokens and 
> possibly AST nodes as well.

Dfix is < 1k LOC, easier to get into but may not teach as much (hence I 
suggest DCD as a starting point).

https://github.com/dlang-community/dfix/blob/master/src/dfix.d


More information about the Digitalmars-d mailing list